forked from openkylin/platform_build
Merge "Add product system server compiler filter property"
This commit is contained in:
commit
c499e0870a
|
@ -175,10 +175,19 @@ 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.
|
||||
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
|
||||
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
|
||||
ifeq (true,$(LOCAL_DEX_PREOPT_GENERATE_PROFILE))
|
||||
|
@ -189,6 +198,7 @@ ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS)))
|
|||
LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=quicken
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
$(built_odex): PRIVATE_DEX_PREOPT_FLAGS := $(LOCAL_DEX_PREOPT_FLAGS)
|
||||
|
|
|
@ -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