diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2017-06-12 15:19:16 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2017-06-15 12:40:15 +0100 |
commit | c3ffeddc59b006518cf7a8c7d70081bf84030e98 (patch) | |
tree | 7ffc79c41cabe2a00cb21dacfc1e66db60d001d3 | |
parent | d6e984f9e3bea44ec2519ecb502a4e93fd1ef1ac (diff) | |
download | build-c3ffeddc59b006518cf7a8c7d70081bf84030e98.tar.gz |
Add a new PRODUCT variable for forcing 'speed' preopt.
bug: 35872915
Test: build
(cherry picked from commit 4a0ad4ac61081f56c4aab50a2aed3001e51f9126)
Change-Id: Idfea3c379a2b1dab30ee94a58ffe86d508f8522f
-rw-r--r-- | core/dex_preopt.mk | 2 | ||||
-rw-r--r-- | core/dex_preopt_odex_install.mk | 4 | ||||
-rw-r--r-- | core/product.mk | 1 | ||||
-rw-r--r-- | core/product_config.mk | 1 | ||||
-rw-r--r-- | target/product/core.mk | 3 | ||||
-rw-r--r-- | target/product/core_tiny.mk | 3 |
6 files changed, 11 insertions, 3 deletions
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk index f940c72e8b..0606c83bc9 100644 --- a/core/dex_preopt.mk +++ b/core/dex_preopt.mk @@ -24,7 +24,7 @@ DEX_PREOPT_DEFAULT ?= true SYSTEM_OTHER_ODEX_FILTER ?= app/% priv-app/% # Method returning whether the install path $(1) should be for system_other. -install-on-system-other = $(filter-out $(PRODUCT_SYSTEM_SERVER_APPS),$(basename $(notdir $(filter $(foreach f,$(SYSTEM_OTHER_ODEX_FILTER),$(TARGET_OUT)/$(f)),$(1))))) +install-on-system-other = $(filter-out $(PRODUCT_DEXPREOPT_SPEED_APPS) $(PRODUCT_SYSTEM_SERVER_APPS),$(basename $(notdir $(filter $(foreach f,$(SYSTEM_OTHER_ODEX_FILTER),$(TARGET_OUT)/$(f)),$(1))))) # The default values for pre-opting: always preopt PIC. # Conditional to building on linux, as dex2oat currently does not work on darwin. diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index a3fb410f97..b9c0fc60b1 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -152,8 +152,8 @@ LOCAL_DEX_PREOPT_FLAGS := $(PRODUCT_DEX_PREOPT_DEFAULT_FLAGS) endif endif -ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS) $(PRODUCT_SYSTEM_SERVER_APPS),$(LOCAL_MODULE))) - # Jars of system server, and apps loaded into system server should be +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 diff --git a/core/product.mk b/core/product.mk index 7742cc3b9a..34cd21ca6a 100644 --- a/core/product.mk +++ b/core/product.mk @@ -114,6 +114,7 @@ _product_var_list := \ PRODUCT_SYSTEM_PROPERTY_BLACKLIST \ PRODUCT_SYSTEM_SERVER_APPS \ PRODUCT_SYSTEM_SERVER_JARS \ + PRODUCT_DEXPREOPT_SPEED_APPS \ PRODUCT_VBOOT_SIGNING_KEY \ PRODUCT_VBOOT_SIGNING_SUBKEY \ PRODUCT_VERITY_SIGNING_KEY \ diff --git a/core/product_config.mk b/core/product_config.mk index e069ff179b..32a3809353 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -269,6 +269,7 @@ all_product_configs := PRODUCT_BOOT_JARS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BOOT_JARS)) PRODUCT_SYSTEM_SERVER_JARS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_JARS)) PRODUCT_SYSTEM_SERVER_APPS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_APPS)) +PRODUCT_DEXPREOPT_SPEED_APPS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEXPREOPT_SPEED_APPS)) # Find the device that this product maps to. TARGET_DEVICE := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEVICE) diff --git a/target/product/core.mk b/target/product/core.mk index a6470acd92..a2b0f1c551 100644 --- a/target/product/core.mk +++ b/target/product/core.mk @@ -68,4 +68,7 @@ PRODUCT_SYSTEM_SERVER_APPS += \ KeyChain \ Telecom \ +# The set of packages we want to force 'speed' compilation on. +PRODUCT_DEXPREOPT_SPEED_APPS += \ + $(call inherit-product, $(SRC_TARGET_DIR)/product/core_base.mk) diff --git a/target/product/core_tiny.mk b/target/product/core_tiny.mk index 7bf16f5787..e9920f2a75 100644 --- a/target/product/core_tiny.mk +++ b/target/product/core_tiny.mk @@ -116,6 +116,9 @@ PRODUCT_SYSTEM_SERVER_APPS += \ SettingsProvider \ WallpaperBackup \ +# The set of packages we want to force 'speed' compilation on. +PRODUCT_DEXPREOPT_SPEED_APPS := \ + PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ ro.zygote=zygote32 PRODUCT_COPY_FILES += \ |