From 832932f835a986a8ae61a0eede98d89433fa00f0 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Sun, 31 Jul 2016 15:47:17 -0700 Subject: [PATCH 1/2] Disable auto installclean for AAPT config change PRODUCT_AAPT_CONFIG and PRODUCT_AAPT_PREF_CONFIG don't affect the installed file list, they only affect how some files are built. The changing command line is already noticed by ninja, so we'll only re-run the necessary commands instead of a full installclean. Change-Id: Ib918b2edeefc539b7f88cb22a1d751c397973b1d --- core/cleanbuild.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk index f61e3f70a..5179455a3 100644 --- a/core/cleanbuild.mk +++ b/core/cleanbuild.mk @@ -152,16 +152,12 @@ endif # if not ONE_SHOT_MAKEFILE dont_bother previous_build_config_file := $(PRODUCT_OUT)/previous_build_config.mk -# A change in the list of aapt configs warrants an installclean, too. -aapt_config_list := $(strip $(PRODUCT_AAPT_CONFIG) $(PRODUCT_AAPT_PREF_CONFIG)) - current_build_config := \ - $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)-{$(aapt_config_list)} + $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) current_sanitize_target := $(strip $(SANITIZE_TARGET)) ifeq (,$(current_sanitize_target)) current_sanitize_target := false endif -aapt_config_list := force_installclean := false force_objclean := false From 84f4f3b7df415616587af4965b48b3c2fd16363f Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Sun, 31 Jul 2016 16:45:32 -0700 Subject: [PATCH 2/2] Don't clean obj/{APPS,JAVA_LIBRARIES} during installclean Anything product specific in here should be caught by an explicit dependency, or the command line changing. This drastically reduces the build time after an installclean. Before this change, we were re-running all dex2oat commands after each installclean, even if nothing changed. Change-Id: I9c735fe2c5d82109d56996021502319179e43671 --- core/cleanbuild.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk index 5179455a3..de6a5ebfd 100644 --- a/core/cleanbuild.mk +++ b/core/cleanbuild.mk @@ -232,7 +232,6 @@ installclean_files := \ $(PRODUCT_OUT)/kernel \ $(PRODUCT_OUT)/data \ $(PRODUCT_OUT)/skin \ - $(PRODUCT_OUT)/obj/APPS \ $(PRODUCT_OUT)/obj/NOTICE_FILES \ $(PRODUCT_OUT)/obj/PACKAGING \ $(PRODUCT_OUT)/recovery \ @@ -240,8 +239,6 @@ installclean_files := \ $(PRODUCT_OUT)/system \ $(PRODUCT_OUT)/vendor \ $(PRODUCT_OUT)/oem \ - $(PRODUCT_OUT)/dex_bootjars \ - $(PRODUCT_OUT)/obj/JAVA_LIBRARIES \ $(PRODUCT_OUT)/obj/FAKE # The files/dirs to delete during a dataclean, which removes any files