diff options
author | Mathieu Chartier <mathieuc@google.com> | 2017-09-18 22:49:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-09-18 22:49:15 +0000 |
commit | 9e2fd26a2950f3665c0e5d3b9c2c081941d562a1 (patch) | |
tree | 5576888931b745dad3746ca593de0878df6cbeed | |
parent | 113fbe4468fd8467cd8047cf86e0b55ce3019d01 (diff) | |
parent | 0fbb836cf624de91ba02bbb15c0d70668002b326 (diff) | |
download | build-9e2fd26a2950f3665c0e5d3b9c2c081941d562a1.tar.gz |
Merge "Add product property for preopting extracted APKs" into oc-mr1-dev
-rw-r--r-- | core/dex_preopt_odex_install.mk | 6 | ||||
-rw-r--r-- | core/prebuilt_internal.mk | 6 | ||||
-rw-r--r-- | core/product.mk | 1 | ||||
-rw-r--r-- | core/product_config.mk | 3 |
4 files changed, 15 insertions, 1 deletions
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index cfcfca5021..4ff6c8d965 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -36,12 +36,16 @@ endif # if WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY=true and module is not in boot class path skip # Also preopt system server jars since selinux prevents system server from loading anything from # /data. If we don't do this they will need to be extracted which is not favorable for RAM usage -# or performance. +# or performance. If my_preopt_for_extracted_apk is true, we ignore the only preopt boot image +# options. +ifneq (true,$(my_preopt_for_extracted_apk)) ifeq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY)) ifeq ($(filter $(PRODUCT_SYSTEM_SERVER_JARS) $(DEXPREOPT_BOOT_JARS_MODULES),$(LOCAL_MODULE)),) LOCAL_DEX_PREOPT := endif endif +endif + # if installing into system, and odex are being installed into system_other, don't strip ifeq ($(BOARD_USES_SYSTEM_OTHER_ODEX),true) ifeq ($(LOCAL_DEX_PREOPT),true) diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk index a9c0bc2bfe..620c22cf5f 100644 --- a/core/prebuilt_internal.mk +++ b/core/prebuilt_internal.mk @@ -281,6 +281,11 @@ $(my_extracted_apk): $(my_prebuilt_src_file) my_prebuilt_src_file := $(my_extracted_apk) my_extracted_apk := my_extract_apk := +ifeq ($(PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK),true) +# If the product property is set, always preopt for extracted modules to prevent executing out of +# the APK. +my_preopt_for_extracted_apk := true +endif endif dex_preopt_profile_src_file := $(my_prebuilt_src_file) @@ -641,3 +646,4 @@ endif # JAVA_LIBRARIES $(built_module) : $(LOCAL_ADDITIONAL_DEPENDENCIES) my_prebuilt_src_file := +my_preopt_for_extracted_apk := diff --git a/core/product.mk b/core/product.mk index c955ccc061..4682dac992 100644 --- a/core/product.mk +++ b/core/product.mk @@ -115,6 +115,7 @@ _product_var_list := \ PRODUCT_SYSTEM_PROPERTY_BLACKLIST \ PRODUCT_SYSTEM_SERVER_APPS \ PRODUCT_SYSTEM_SERVER_JARS \ + PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK \ PRODUCT_DEXPREOPT_SPEED_APPS \ PRODUCT_VBOOT_SIGNING_KEY \ PRODUCT_VBOOT_SIGNING_SUBKEY \ diff --git a/core/product_config.mk b/core/product_config.mk index cd62fb2e41..f7ae834fbc 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -260,6 +260,9 @@ PRODUCT_SYSTEM_SERVER_JARS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYS PRODUCT_SYSTEM_SERVER_APPS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_APPS)) PRODUCT_DEXPREOPT_SPEED_APPS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEXPREOPT_SPEED_APPS)) +# All of the apps that we force preopt, this overrides WITH_DEXPREOPT. +PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK)) + # Find the device that this product maps to. TARGET_DEVICE := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEVICE) |