From 75b50421af4d8fb799d678e5bf484aa1344f4bab Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 27 Jul 2017 12:34:34 -0700 Subject: [PATCH] Compile with javac by default javac is replacing jack as the default compiler for platform builds. Leave it on for unbundled builds, we don't have a solution for lambdas in unbundled builds yet (b/62038127). Temporarily allow products to continue to default to jack by setting PRODUCT_COMPILE_WITH_JACK=true. This reapplies I1c3857f64eafa445ad1b9dd94eff85bef05f4649. Bug: 36902714 Test: m -j checkbuild Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L50600000086240009&nodeType=Trybot Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L68900000086676531&nodeType=Trybot Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L37200000086753998&nodeType=Trybot Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L74600000087054271&nodeType=Trybot Test: sailfish-userdebug boots and basic interactions work Test: art tests pass Test: libcore tests pass Change-Id: Icd1b549cd8a010758a6e5d98b39569fcd1825f60 --- core/combo/javac.mk | 13 +++++++++++-- core/product.mk | 1 + core/product_config.mk | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/core/combo/javac.mk b/core/combo/javac.mk index 7d19279ce..0538c5299 100644 --- a/core/combo/javac.mk +++ b/core/combo/javac.mk @@ -10,8 +10,17 @@ # ifndef ANDROID_COMPILE_WITH_JACK -# Defines if compilation with jack is enabled by default. -ANDROID_COMPILE_WITH_JACK := true + # TODO(b/64113890, b/35788202): remove PRODUCT_COMPILE_WITH_JACK + ifdef PRODUCT_COMPILE_WITH_JACK + ANDROID_COMPILE_WITH_JACK := $(PRODUCT_COMPILE_WITH_JACK) + else + # TODO(b/62038127): remove TARGET_BUILD_APPS check + ifdef TARGET_BUILD_APPS + ANDROID_COMPILE_WITH_JACK := true + else + ANDROID_COMPILE_WITH_JACK := false + endif + endif endif common_jdk_flags := -Xmaxerrs 9999999 diff --git a/core/product.mk b/core/product.mk index c5ddf817a..62e385931 100644 --- a/core/product.mk +++ b/core/product.mk @@ -136,6 +136,7 @@ _product_var_list := \ PRODUCT_SYSTEM_HEADROOM \ PRODUCT_MINIMIZE_JAVA_DEBUG_INFO \ PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS \ + PRODUCT_COMPILE_WITH_JACK \ diff --git a/core/product_config.mk b/core/product_config.mk index 36f473ff0..b12425ca1 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -435,3 +435,7 @@ PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := \ # Whether any paths are excluded from sanitization when SANITIZE_TARGET=integer_overflow PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS := \ $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS)) + +# Temporarily force Jack back on for a product +PRODUCT_COMPILE_WITH_JACK := \ + $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_COMPILE_WITH_JACK))