Unset ENABLE_PREOPT when DISABLE_PREOPT is set
Instead of TARGET_BUILD_APPS, introduce DISABLE_PREOPT,
which is true when TARGET_BUILD_UNBUNDLED_IMAGE or TARGET_BUILD_APPS is set.
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage and then
check if there is no preopt
Bug: 160390776
Change-Id: Id27030e602a29ebd438678270db13744dd145143
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk
index 55f6f0b..41a2be9 100644
--- a/core/dex_preopt_config.mk
+++ b/core/dex_preopt_config.mk
@@ -5,7 +5,7 @@
ENABLE_PREOPT :=
else ifneq (true,$(filter true,$(PRODUCT_USES_DEFAULT_ART_CONFIG)))
ENABLE_PREOPT :=
-else ifneq (,$(TARGET_BUILD_APPS))
+else ifeq (true,$(DISABLE_PREOPT))
ENABLE_PREOPT :=
endif