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:
@@ -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)))))
|
||||
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)
|
||||
|
@@ -115,16 +115,14 @@ ifdef LOCAL_SOONG_DEX_JAR
|
||||
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
|
||||
|
Reference in New Issue
Block a user