From 440cc769a3617bf99546bdc7599c949e1e858943 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Mon, 4 Aug 2014 17:09:41 -0700 Subject: [PATCH] Add a WITH_DEXOPT_BOOT_IMG_ONLY configuration option. If WITH_DEXOPT_BOOT_IMG_ONLY=true and WITH_DEXPREOPT=true then we will only preopt the boot.art and boot.oat files, leaving everything else to be compiled at first boot. This has fast startup times of WITH_DEXPREOPT but has a smaller space usage and allows one to update the non-image parts of /system without reflashing. Bug: 16938924 Change-Id: Ib366b6b5ad80f7078f01bf51f9fbc29ea7e5d777 --- core/dex_preopt_odex_install.mk | 6 ++++++ core/product.mk | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index 613b058ac..10b41bdc7 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -32,6 +32,12 @@ endif ifneq (,$(filter $(LOCAL_MODULE),$(PRODUCT_DEX_PREOPT_PACKAGES_IN_DATA))) LOCAL_DEX_PREOPT := endif +# if WITH_DEXPREOPT_BOOT_IMG_ONLY=true and module is not in boot class path skip +ifeq (true,$(WITH_DEXPREOPT_BOOT_IMG_ONLY)) +ifeq ($(filter $(DEXPREOPT_BOOT_JARS_MODULES),$(LOCAL_MODULE)),) +LOCAL_DEX_PREOPT := +endif +endif built_odex := installed_odex := diff --git a/core/product.mk b/core/product.mk index fd405ad75..dbf49b5d7 100644 --- a/core/product.mk +++ b/core/product.mk @@ -253,7 +253,8 @@ _product_stash_var_list += \ _product_stash_var_list += \ DEFAULT_SYSTEM_DEV_CERTIFICATE \ - WITH_DEXPREOPT + WITH_DEXPREOPT \ + WITH_DEXPREOPT_BOOT_IMG_ONLY # # Stash values of the variables in _product_stash_var_list.