Move the installation rules of device boot images to soong

This CL adds moves the installation rules of boot images to soong. This
will eventually allow us to build devices by skipping `katiBuild` and
moving straight to `katiPackaging`

Details
1. Drop `dex_preopt_libart.mk` calls for device boot images. This was
   previously generating the copy rules of soong built artifacts into
the installation directory in $PRODUCT_OUT. The installation rules will
now be generated by soong's dex_bootjars singleton
2. Drop the profile files of `DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED`
   from the `ALL_DEFAULT_INSTALLED_MODULES`. This will be installed by
dex_bootjars singleton as well.
3. Replace the REQUIRED property in reverse dependencies with
   `dex_bootjars`. By adding this singleton to required, we ensure that
the boot images get installed on device.

This CL does not change the behavior for installation rules of host boot
images. (Those will be tracked in b/355706080)

Test: no diff in
target/product/vsoc_x86_64/obj/PACKAGING/system_intermediates/file_list.txt
(top of stack)
Bug: 355700341
Bug: 355703904

Change-Id: Id854feead08df6c2fcbb6175860f76378fc5af5f
This commit is contained in:
Spandan Das
2024-07-31 00:14:58 +00:00
parent 5228a6f4a2
commit 99419d2e06
2 changed files with 4 additions and 25 deletions

View File

@@ -13,25 +13,6 @@ else
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))))) 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 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. # 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_arch := HOST_ARCH
my_boot_image_out := $(HOST_OUT) my_boot_image_out := $(HOST_OUT)

View File

@@ -115,16 +115,14 @@ ifdef LOCAL_SOONG_DEX_JAR
boot_jars := $(foreach pair,$(PRODUCT_BOOT_JARS), $(call word-colon,2,$(pair))) boot_jars := $(foreach pair,$(PRODUCT_BOOT_JARS), $(call word-colon,2,$(pair)))
ifneq ($(filter $(LOCAL_MODULE),$(boot_jars)),) # is_boot_jar ifneq ($(filter $(LOCAL_MODULE),$(boot_jars)),) # is_boot_jar
ifeq (true,$(WITH_DEXPREOPT)) ifeq (true,$(WITH_DEXPREOPT))
# $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE) contains modules that installs # dex_bootjars singleton installs all of bootjars' dexpreopt files (.art, .oat, .vdex, ...)
# 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. # Add them to the required list so they are installed alongside this module.
ALL_MODULES.$(my_register_name).REQUIRED_FROM_TARGET += \ ALL_MODULES.$(my_register_name).REQUIRED_FROM_TARGET += dex_bootjars
$(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE) \
$(2ND_DEFAULT_DEX_PREOPT_INSTALLED_IMAGE_MODULE)
# Copy $(LOCAL_BUILT_MODULE) and its dependencies when installing boot.art # Copy $(LOCAL_BUILT_MODULE) and its dependencies when installing boot.art
# so that dependencies of $(LOCAL_BUILT_MODULE) (which may include # so that dependencies of $(LOCAL_BUILT_MODULE) (which may include
# jacoco-report-classes.jar) are copied for every build. # 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))) \ $(eval $(call add-dependency,$(firstword $(call module-installed-files,$(m))),$(LOCAL_BUILT_MODULE))) \
) )
endif endif