Add product system server compiler filter property
The product only needs to specify PRODUCT_SYSTEM_SERVER_COMPILER_FILTER. This determines what compiler filter system server jars are compiled with. Test: update marlin device Test: make and look at services.odex Bug: 62356545 Change-Id: Id51726ae03576d7b4eb784b861158bb451c39deb
This commit is contained in:
parent
dacde83555
commit
6a90210c62
|
@ -175,18 +175,28 @@ LOCAL_DEX_PREOPT_FLAGS := $(PRODUCT_DEX_PREOPT_DEFAULT_FLAGS)
|
|||
endif
|
||||
endif
|
||||
|
||||
my_system_server_compiler_filter := $(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER)
|
||||
ifeq (,$(my_system_server_compiler_filter))
|
||||
my_system_server_compiler_filter := speed
|
||||
endif
|
||||
|
||||
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
|
||||
ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE)))
|
||||
# Jars of system server, use the product option if it is set, speed otherwise.
|
||||
LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=$(my_system_server_compiler_filter)
|
||||
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
|
||||
ifneq (,$(filter $(PRODUCT_DEXPREOPT_SPEED_APPS) $(PRODUCT_SYSTEM_SERVER_APPS),$(LOCAL_MODULE)))
|
||||
# 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
|
||||
# If no compiler filter is specified, default to 'quicken' to save on storage.
|
||||
LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=quicken
|
||||
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
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -227,6 +227,11 @@ ifdef TARGET_2ND_ARCH
|
|||
endif
|
||||
endif
|
||||
|
||||
# Add the system server compiler filter if they are specified for the product.
|
||||
ifneq (,$(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER))
|
||||
ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.systemservercompilerfilter=$(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER)
|
||||
endif
|
||||
|
||||
## user/userdebug ##
|
||||
|
||||
user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT))
|
||||
|
|
|
@ -124,6 +124,7 @@ _product_var_list := \
|
|||
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \
|
||||
PRODUCT_DEX_PREOPT_BOOT_FLAGS \
|
||||
PRODUCT_DEX_PREOPT_PROFILE_DIR \
|
||||
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER \
|
||||
PRODUCT_SANITIZER_MODULE_CONFIGS \
|
||||
PRODUCT_SYSTEM_BASE_FS_PATH \
|
||||
PRODUCT_VENDOR_BASE_FS_PATH \
|
||||
|
|
|
@ -383,6 +383,9 @@ PRODUCT_DEX_PREOPT_BOOT_FLAGS := \
|
|||
PRODUCT_DEX_PREOPT_PROFILE_DIR := \
|
||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_PROFILE_DIR))
|
||||
|
||||
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := \
|
||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_COMPILER_FILTER))
|
||||
|
||||
# Resolve and setup per-module dex-preopt configs.
|
||||
PRODUCT_DEX_PREOPT_MODULE_CONFIGS := \
|
||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_MODULE_CONFIGS))
|
||||
|
|
Loading…
Reference in New Issue