From d8badf5b8befb40a40a42afe9b71bf8e19973806 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 20 Feb 2019 12:39:57 -0800 Subject: [PATCH] Fix boot_profile_jars.zip Some of the inputs to boot_profile_jars.zip have moved outside of $(PRODUCT_OUT), update the -C argument to soong_zip to point to the right directory. Also make the rule to build the zip always present, and only gate the dist command behind PRODUCT_DIST_BOOT_AND_SYSTEM_JARS. Test: m out/target/product/blueline/boot_profile_jars.zip Change-Id: Iaa72be955edda445f3eab041a63f79c9055d6b33 --- core/dex_preopt.mk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk index 6d5fc7906..5a32ee9bb 100644 --- a/core/dex_preopt.mk +++ b/core/dex_preopt.mk @@ -15,19 +15,19 @@ endif include $(BUILD_SYSTEM)/dex_preopt_libart.mk -ifeq ($(PRODUCT_DIST_BOOT_AND_SYSTEM_JARS),true) boot_profile_jars_zip := $(PRODUCT_OUT)/boot_profile_jars.zip -all_boot_jars := \ - $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES) \ - $(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),$(PRODUCT_OUT)/system/framework/$(m).jar) +bootclasspath_jars := $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES) +system_server_jars := $(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),$(PRODUCT_OUT)/system/framework/$(m).jar) -$(boot_profile_jars_zip): PRIVATE_JARS := $(all_boot_jars) -$(boot_profile_jars_zip): $(all_boot_jars) $(SOONG_ZIP) - echo "Create boot profiles package: $@" +$(boot_profile_jars_zip): PRIVATE_BOOTCLASSPATH_JARS := $(bootclasspath_jars) +$(boot_profile_jars_zip): PRIVATE_SYSTEM_SERVER_JARS := $(system_server_jars) +$(boot_profile_jars_zip): $(bootclasspath_jars) $(system_server_jars) $(SOONG_ZIP) + @echo "Create boot profiles package: $@" rm -f $@ - $(SOONG_ZIP) -o $@ -C $(PRODUCT_OUT) $(addprefix -f ,$(PRIVATE_JARS)) - -droidcore: $(boot_profile_jars_zip) + $(SOONG_ZIP) -o $@ \ + -C $(dir $(firstword $(PRIVATE_BOOTCLASSPATH_JARS)))/.. $(addprefix -f ,$(PRIVATE_BOOTCLASSPATH_JARS)) \ + -C $(PRODUCT_OUT) $(addprefix -f ,$(PRIVATE_SYSTEM_SERVER_JARS)) +ifeq ($(PRODUCT_DIST_BOOT_AND_SYSTEM_JARS),true) $(call dist-for-goals, droidcore, $(boot_profile_jars_zip)) endif