From f712ba95dc84d4f42f397cd4db90c974928d1c0c Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Thu, 4 Jun 2020 20:47:55 +0100 Subject: [PATCH] Disable dexpreopting when TARGET_BUILD_APPS is used. This moves the condition from Soong to make, so that config.UnbundledBuild() in Soong no longer implies disabling dexpreopting. Test: TH, in particular builds green on ub-launcher3-master Bug: 157549171 Change-Id: I7273be8591c9d627d89e033b641139dacc275806 --- core/dex_preopt_config.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk index 56f0a62c0d..7d7d526a20 100644 --- a/core/dex_preopt_config.mk +++ b/core/dex_preopt_config.mk @@ -1,5 +1,14 @@ DEX_PREOPT_CONFIG := $(SOONG_OUT_DIR)/dexpreopt.config +ENABLE_PREOPT := true +ifneq (true,$(filter true,$(WITH_DEXPREOPT))) + ENABLE_PREOPT := +else ifneq (true,$(filter true,$(PRODUCT_USES_DEFAULT_ART_CONFIG))) + ENABLE_PREOPT := +else ifneq (,$(TARGET_BUILD_APPS)) + ENABLE_PREOPT := +endif + # The default value for LOCAL_DEX_PREOPT DEX_PREOPT_DEFAULT ?= true @@ -60,7 +69,7 @@ ifeq ($(WRITE_SOONG_VARIABLES),true) $(call json_start) - $(call add_json_bool, DisablePreopt, $(call invert_bool,$(and $(filter true,$(PRODUCT_USES_DEFAULT_ART_CONFIG)),$(filter true,$(WITH_DEXPREOPT))))) + $(call add_json_bool, DisablePreopt, $(call invert_bool,$(ENABLE_PREOPT))) $(call add_json_list, DisablePreoptModules, $(DEXPREOPT_DISABLED_MODULES)) $(call add_json_bool, OnlyPreoptBootImageAndSystemServer, $(filter true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY))) $(call add_json_bool, UseArtImage, $(filter true,$(DEXPREOPT_USE_ART_IMAGE)))