Merge "Move the installation rules of device boot images to soong" into main
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 26b8b17..906d7f0 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -13,25 +13,6 @@
install-on-system-other = $(filter-out $(PRODUCT_DEXPREOPT_SPEED_APPS) $(PRODUCT_SYSTEM_SERVER_APPS),$(basename $(notdir $(filter $(foreach f,$(SYSTEM_OTHER_ODEX_FILTER),$(TARGET_OUT)/$(f)),$(1)))))
endif
-# We want to install the profile even if we are not using preopt since it is required to generate
-# the image on the device.
-ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED),$(PRODUCT_OUT))
-
-# Install boot images. Note that there can be multiple.
-my_boot_image_arch := TARGET_ARCH
-my_boot_image_out := $(PRODUCT_OUT)
-my_boot_image_syms := $(TARGET_OUT_UNSTRIPPED)
-DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE := \
- $(foreach my_boot_image_name,$(DEXPREOPT_IMAGE_NAMES),$(strip \
- $(eval include $(BUILD_SYSTEM)/dex_preopt_libart.mk) \
- $(my_boot_image_module)))
-ifdef TARGET_2ND_ARCH
- my_boot_image_arch := TARGET_2ND_ARCH
- 2ND_DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE := \
- $(foreach my_boot_image_name,$(DEXPREOPT_IMAGE_NAMES),$(strip \
- $(eval include $(BUILD_SYSTEM)/dex_preopt_libart.mk) \
- $(my_boot_image_module)))
-endif
# Install boot images for testing on host. We exclude framework image as it is not part of art manifest.
my_boot_image_arch := HOST_ARCH
my_boot_image_out := $(HOST_OUT)
diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk
index 7f85231..f74bb6d 100644
--- a/core/soong_java_prebuilt.mk
+++ b/core/soong_java_prebuilt.mk
@@ -115,16 +115,14 @@
boot_jars := $(foreach pair,$(PRODUCT_BOOT_JARS), $(call word-colon,2,$(pair)))
ifneq ($(filter $(LOCAL_MODULE),$(boot_jars)),) # is_boot_jar
ifeq (true,$(WITH_DEXPREOPT))
- # $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE) contains modules that installs
- # all of bootjars' dexpreopt files (.art, .oat, .vdex, ...)
+ # dex_bootjars singleton installs all of bootjars' dexpreopt files (.art, .oat, .vdex, ...)
+ # This includes both the primary and secondary arches.
# Add them to the required list so they are installed alongside this module.
- ALL_MODULES.$(my_register_name).REQUIRED_FROM_TARGET += \
- $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE) \
- $(2ND_DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE)
+ ALL_MODULES.$(my_register_name).REQUIRED_FROM_TARGET += dex_bootjars
# Copy $(LOCAL_BUILT_MODULE) and its dependencies when installing boot.art
# so that dependencies of $(LOCAL_BUILT_MODULE) (which may include
# jacoco-report-classes.jar) are copied for every build.
- $(foreach m,$(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE) $(2ND_DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE), \
+ $(foreach m,dex_bootjars, \
$(eval $(call add-dependency,$(firstword $(call module-installed-files,$(m))),$(LOCAL_BUILT_MODULE))) \
)
endif