build: remove compile_strategy from ng_module.bzl (#33999)

With the migration of internal i18n rule to use is_ivy_enabled complete, we
can remove compile_strategy as it is now unused.

PR Close #33999
This commit is contained in:
Joey Perrott 2019-11-22 15:00:38 -08:00 committed by Matias Niemelä
parent 8969f35bb5
commit d80eeb6959
1 changed files with 0 additions and 28 deletions

View File

@ -26,34 +26,6 @@ load(
_FLAT_DTS_FILE_SUFFIX = ".bundle.d.ts" _FLAT_DTS_FILE_SUFFIX = ".bundle.d.ts"
_R3_SYMBOLS_DTS_FILE = "src/r3_symbols.d.ts" _R3_SYMBOLS_DTS_FILE = "src/r3_symbols.d.ts"
def compile_strategy(ctx):
"""Detect which strategy should be used to implement ng_module.
Depending on the value of the 'compile' define flag, ng_module
can be implemented in various ways. This function reads the configuration passed by the user and
determines which mode is active.
Args:
ctx: skylark rule execution context
Returns:
one of 'legacy' or 'aot' depending on the configuration in ctx
"""
strategy = "legacy"
if "compile" in ctx.var:
strategy = ctx.var["compile"]
# Enable Angular targets extracted by Kythe Angular indexer to be compiled with the Ivy compiler architecture.
# TODO(ayazhafiz): remove once Ivy has landed as the default in g3.
if ctx.var.get("GROK_ELLIPSIS_BUILD", None) != None:
strategy = "aot"
if strategy not in ["legacy", "aot"]:
fail("Unknown --define=compile value '%s'" % strategy)
return strategy
def is_ivy_enabled(ctx): def is_ivy_enabled(ctx):
"""Determine if the ivy compiler should be used to by the ng_module. """Determine if the ivy compiler should be used to by the ng_module.