Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ddbe53d authored by Calin Juravle's avatar Calin Juravle
Browse files

Revert "Revert "Add the entire boot image to boot.zip""

This reverts commit 4d5f5ff9.

Reason for revert: The original failure is fixed. The problem was that we
unconditionally built the boot.zip even if the product was not correctly
configured for preopting.

Bug: 130376456
Test: launch aosp_qemu_trusty-userdebug, m dist

Change-Id: I25b0c03ee9e7a2c2ff25db406656ce79baff5a46
parent 4ff3d793
Loading
Loading
Loading
Loading
+18 −9
Original line number Diff line number Diff line
@@ -22,19 +22,28 @@ DEFAULT_DEX_PREOPT_INSTALLED_IMAGE :=
$(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE :=
$(foreach my_boot_image_name,$(DEXPREOPT_IMAGE_NAMES),$(eval include $(BUILD_SYSTEM)/dex_preopt_libart.mk))

boot_profile_jars_zip := $(PRODUCT_OUT)/boot_profile_jars.zip
# Build the boot.zip which contains the boot jars and their compilation output
# We can do this only if preopt is enabled and if the product uses libart config (which sets the
# default properties for preopting).
ifeq ($(WITH_DEXPREOPT), true)
ifeq ($(PRODUCT_USES_ART), true)

boot_zip := $(PRODUCT_OUT)/boot.zip
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_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: $@"
$(boot_zip): PRIVATE_BOOTCLASSPATH_JARS := $(bootclasspath_jars)
$(boot_zip): PRIVATE_SYSTEM_SERVER_JARS := $(system_server_jars)
$(boot_zip): $(bootclasspath_jars) $(system_server_jars) $(SOONG_ZIP) $(MERGE_ZIPS) $(DEXPREOPT_IMAGE_ZIP_boot)
	@echo "Create boot package: $@"
	rm -f $@
	$(SOONG_ZIP) -o $@ \
	$(SOONG_ZIP) -o $@.tmp \
	  -C $(dir $(firstword $(PRIVATE_BOOTCLASSPATH_JARS)))/.. $(addprefix -f ,$(PRIVATE_BOOTCLASSPATH_JARS)) \
	  -C $(PRODUCT_OUT) $(addprefix -f ,$(PRIVATE_SYSTEM_SERVER_JARS))
	$(MERGE_ZIPS) $@ $@.tmp $(DEXPREOPT_IMAGE_ZIP_boot)
	rm -f $@.tmp

ifeq ($(PRODUCT_DIST_BOOT_AND_SYSTEM_JARS),true)
$(call dist-for-goals, droidcore, $(boot_profile_jars_zip))
endif
$(call dist-for-goals, droidcore com.android.runtime.host, $(boot_zip))

endif  #PRODUCT_USES_ART
endif  #WITH_DEXPREOPT
+1 −0
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ _product_var_list += PRODUCT_DEX_PREOPT_NEVER_ALLOW_STRIPPING
_product_var_list += \
    PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE \
    PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION \
    PRODUCT_USES_ART \

_product_var_list += PRODUCT_SYSTEM_SERVER_COMPILER_FILTER
# Per-module sanitizer configs
+2 −0
Original line number Diff line number Diff line
@@ -95,3 +95,5 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
# Disable iorapd by default
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
    ro.iorapd.enable=false

PRODUCT_USES_ART := true