diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk index 1e7b193db..fa2b7e35c 100644 --- a/core/dex_preopt_libart.mk +++ b/core/dex_preopt_libart.mk @@ -26,12 +26,16 @@ PRELOADED_CLASSES := frameworks/base/preloaded-classes LIBART_BOOT_IMAGE := /$(DEXPREOPT_BOOT_JAR_DIR)/boot.art DEFAULT_DEX_PREOPT_BUILT_IMAGE := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/boot.art + +DEFAULT_DEX_PREOPT_INSTALLED_IMAGE := +ifneq ($(PRODUCT_DEX_PREOPT_IMAGE_IN_DATA),true) DEFAULT_DEX_PREOPT_INSTALLED_IMAGE := $(PRODUCT_OUT)$(LIBART_BOOT_IMAGE) # The rule to install boot.art and boot.oat $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) : $(DEFAULT_DEX_PREOPT_BUILT_IMAGE) | $(ACP) $(call copy-file-to-target) $(hide) $(ACP) -fp $(patsubst %.art,%.oat,$<) $(patsubst %.art,%.oat,$@) +endif DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default ifeq ($(TARGET_CPU_VARIANT),$(filter $(TARGET_CPU_VARIANT),cortex-a15 krait)) diff --git a/core/product.mk b/core/product.mk index a2f4abc48..cf6fb9a4f 100644 --- a/core/product.mk +++ b/core/product.mk @@ -97,8 +97,8 @@ _product_var_list := \ PRODUCT_FACTORY_RAMDISK_MODULES \ PRODUCT_FACTORY_BUNDLE_MODULES \ PRODUCT_RUNTIMES \ - PRODUCT_BOOT_JARS - + PRODUCT_BOOT_JARS \ + PRODUCT_DEX_PREOPT_IMAGE_IN_DATA \ define dump-product $(info ==== $(1) ====)\ @@ -255,7 +255,7 @@ _product_stash_var_list += \ DEFAULT_SYSTEM_DEV_CERTIFICATE # -# Stash vaues of the variables in _product_stash_var_list. +# Stash values of the variables in _product_stash_var_list. # $(1): Renamed prefix # define stash-product-vars diff --git a/core/product_config.mk b/core/product_config.mk index 0574c66fd..7a27426d7 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -402,3 +402,7 @@ PRODUCT_OTA_PUBLIC_KEYS := $(sort \ PRODUCT_EXTRA_RECOVERY_KEYS := $(sort \ $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_EXTRA_RECOVERY_KEYS)) + +# If there is no room in /system for the image, place it in /data +PRODUCT_DEX_PREOPT_IMAGE_IN_DATA := \ + $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_IMAGE_IN_DATA))