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))