build: create --config=ivy flag to set the angular_ivy_enabled define flag value (#33983)

Beginning of migration away from --define=compile=* to --define=angular_ivy_enabled=*.
Additionally, to make it clearer to developers, we will encourage use of --config=ivy
instead of directy setting the --define flag, this abstraction will allow us more
flexibility as we move foward with relation to our compile decisions at build time.

PR Close #33983
This commit is contained in:
Joey Perrott 2019-11-22 12:00:49 -08:00 committed by Matias Niemelä
parent 3414760bdd
commit f9def8cd30
3 changed files with 9 additions and 2 deletions

View File

@ -64,8 +64,13 @@ test --test_output=errors
################################
# Temporary Settings for Ivy #
################################
# to determine if the compiler used should be Ivy or ViewEngine one can use `--define=compile=aot` on
# any bazel target. This is a temporary flag until codebase is permanently switched to Ivy.
# To determine if the compiler used should be Ivy instead of ViewEngine, one can use `--config=ivy`
# on any bazel target. This is a temporary flag until codebase is permanently switched to Ivy.
build --define=angular_ivy_enabled=False
build:view-engine --define=angular_ivy_enabled=False
build:ivy --define=angular_ivy_enabled=True --define=compile=aot
build --define=compile=legacy
##################################

View File

@ -13,6 +13,7 @@ build --local_resources=14336,8.0,1.0
# Use the Angular Ivy compiler
# See https://github.com/angular/angular/blob/master/docs/BAZEL.md#various-flags-used-for-tests
build --define=angular_ivy_enabled=True
build --define=compile=aot
# Temporary define while angular depends on the legacy rollup_bundle rule.

View File

@ -30,6 +30,7 @@ test --test_output=errors
# Use the Angular Ivy compiler
# See https://github.com/angular/angular/blob/master/docs/BAZEL.md#various-flags-used-for-tests
build --define=compile=aot
build --define=angular_ivy_enabled=True
# Temporary define while angular depends on the legacy rollup_bundle rule.
# TODO: remove this setting after https://github.com/angular/angular/pull/33201 lands.