From 82055b2fb82a8ba6823c9667c9476889bf63ad76 Mon Sep 17 00:00:00 2001 From: Ayaz Hafiz Date: Mon, 22 Jul 2019 12:24:14 -0700 Subject: [PATCH] feat(bazel): compile targets used for indexing by Kythe with Ivy (#31786) This switches all Angular targets to be built with the same Angular compiler architecture (c.n. Ivy) that the Angular indexer uses. This eliminates issues with cross-references to transitive dependencies not being generated because of the way such dependencies are loaded by the legacy compiler arch. PR Close #31786 --- packages/bazel/src/ng_module.bzl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/bazel/src/ng_module.bzl b/packages/bazel/src/ng_module.bzl index c9a93c2438..9b88fbb51c 100644 --- a/packages/bazel/src/ng_module.bzl +++ b/packages/bazel/src/ng_module.bzl @@ -42,6 +42,11 @@ def compile_strategy(ctx): 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)