Merge "Add a product property for changing the default compiler filter"

This commit is contained in:
Mathieu Chartier 2018-02-16 23:41:21 +00:00 committed by Gerrit Code Review
commit 60431c098e
3 changed files with 10 additions and 2 deletions

View File

@ -224,6 +224,12 @@ ifeq (,$(my_system_server_compiler_filter))
my_system_server_compiler_filter := speed my_system_server_compiler_filter := speed
endif endif
my_default_compiler_filter := $(PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER)
ifeq (,$(my_default_compiler_filter))
# If no default compiler filter is specified, default to 'quicken' to save on storage.
my_default_compiler_filter := quicken
endif
ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS))) ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS)))
ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE))) ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE)))
# Jars of system server, use the product option if it is set, speed otherwise. # Jars of system server, use the product option if it is set, speed otherwise.
@ -238,8 +244,7 @@ ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS)))
# For non system server jars, use speed-profile when we have a profile. # For non system server jars, use speed-profile when we have a profile.
LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed-profile LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed-profile
else else
# If no compiler filter is specified, default to 'quicken' to save on storage. LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=$(my_default_compiler_filter)
LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=quicken
endif endif
endif endif
endif endif

View File

@ -129,6 +129,7 @@ _product_var_list := \
PRODUCT_PRODUCT_VERITY_PARTITION \ PRODUCT_PRODUCT_VERITY_PARTITION \
PRODUCT_SYSTEM_SERVER_DEBUG_INFO \ PRODUCT_SYSTEM_SERVER_DEBUG_INFO \
PRODUCT_DEX_PREOPT_MODULE_CONFIGS \ PRODUCT_DEX_PREOPT_MODULE_CONFIGS \
PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER \
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \ PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \
PRODUCT_DEX_PREOPT_BOOT_FLAGS \ PRODUCT_DEX_PREOPT_BOOT_FLAGS \
PRODUCT_DEX_PREOPT_PROFILE_DIR \ PRODUCT_DEX_PREOPT_PROFILE_DIR \

View File

@ -392,6 +392,8 @@ PRODUCT_OTA_PUBLIC_KEYS := $(sort \
PRODUCT_EXTRA_RECOVERY_KEYS := $(sort \ PRODUCT_EXTRA_RECOVERY_KEYS := $(sort \
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_EXTRA_RECOVERY_KEYS)) $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_EXTRA_RECOVERY_KEYS))
PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER))
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS := \ PRODUCT_DEX_PREOPT_DEFAULT_FLAGS := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_DEFAULT_FLAGS)) $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_DEFAULT_FLAGS))
PRODUCT_DEX_PREOPT_BOOT_FLAGS := \ PRODUCT_DEX_PREOPT_BOOT_FLAGS := \