From b8d3cc02cdbb2708deb699ec00b6d1e3fd291196 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Fri, 16 Jun 2017 11:17:53 -0700 Subject: [PATCH] Allow custom compiler filters for system server jars Passing down a compiler filter in LOCAL_DEX_PREOPT_FLAGS or PRODUCT_DEX_PREOPT_DEFAULT_FLAGS will no longer always get overridden to speed. Bug: 62356545 Test: make and flash Change-Id: I8b777c8881cba6b11cda56d27f0a714c92d70d94 --- core/dex_preopt_odex_install.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index 2b401f00b5..9c543dde14 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -175,17 +175,17 @@ LOCAL_DEX_PREOPT_FLAGS := $(PRODUCT_DEX_PREOPT_DEFAULT_FLAGS) endif endif -ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS) $(PRODUCT_DEXPREOPT_SPEED_APPS) $(PRODUCT_SYSTEM_SERVER_APPS),$(LOCAL_MODULE))) - # Jars of system server, apps loaded into system server, and apps the product wants to be - # compiled with the 'speed' compiler filter. - LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed -else - # If no compiler filter is specified, default to 'quicken' to save on storage. - ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS))) +ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS))) + ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS) $(PRODUCT_DEXPREOPT_SPEED_APPS) $(PRODUCT_SYSTEM_SERVER_APPS),$(LOCAL_MODULE))) + # Jars of system server, apps loaded into system server, and apps the product default to being + # compiled with the 'speed' compiler filter. + LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed + else ifeq (true,$(LOCAL_DEX_PREOPT_GENERATE_PROFILE)) # For non system server jars, use speed-profile when we have a profile. LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed-profile else + # If no compiler filter is specified, default to 'quicken' to save on storage. LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=quicken endif endif