Install boot.art extra files individually
The rule that builds boot.art also produces boot.oat, boot-*.art, and boot-*.oat as a side effect, and the install rule for boot.art was installing them using *.art and *.oat. This meant that PDK builds had no rule to install the extra files, so it used the ones from the platform.zip file instead of the locally built ones. Generate a list of the files that should be produced by the boot.art build, and manually create install rules for them that depend on the built boot.art and are depended on by the installed boot.art. Bug: 27546601 Change-Id: I9734491c3179bca2d4b2ae13b0c6a03e4c26b0b2
This commit is contained in:
parent
b8b72c14e5
commit
52dcb2f816
|
@ -67,6 +67,13 @@ LIBART_TARGET_BOOT_JARS := $(patsubst core, core-libart,$(DEXPREOPT_BOOT_JARS_MO
|
|||
LIBART_TARGET_BOOT_DEX_LOCATIONS := $(foreach jar,$(LIBART_TARGET_BOOT_JARS),/$(DEXPREOPT_BOOT_JAR_DIR)/$(jar).jar)
|
||||
LIBART_TARGET_BOOT_DEX_FILES := $(foreach jar,$(LIBART_TARGET_BOOT_JARS),$(call intermediates-dir-for,JAVA_LIBRARIES,$(jar),,COMMON)/javalib.jar)
|
||||
|
||||
# dex preopt on the bootclasspath produces multiple files. The first dex file
|
||||
# is converted into to boot.art (to match the legacy assumption that boot.art
|
||||
# exists), and the rest are converted to boot-<name>.art.
|
||||
# In addition, each .art file has an associated .oat file.
|
||||
LIBART_TARGET_BOOT_ART_EXTRA_FILES := $(foreach jar,$(wordlist 2,999,$(LIBART_TARGET_BOOT_JARS)),boot-$(jar).art)
|
||||
LIBART_TARGET_BOOT_ART_EXTRA_FILES += boot.oat $(patsubst %.art,%.oat,$(LIBART_TARGET_BOOT_ART_EXTRA_FILES))
|
||||
|
||||
my_2nd_arch_prefix :=
|
||||
include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@ $(my_2nd_arch_prefix)LIBART_BOOT_IMAGE_FILENAME := /$(DEXPREOPT_BOOT_JAR_DIR)/$(
|
|||
$(my_2nd_arch_prefix)LIBART_TARGET_BOOT_OAT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)$(patsubst %.art,%.oat,$($(my_2nd_arch_prefix)LIBART_BOOT_IMAGE_FILENAME))
|
||||
|
||||
$(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE := $(PRODUCT_OUT)$($(my_2nd_arch_prefix)LIBART_BOOT_IMAGE_FILENAME)
|
||||
$(my_2nd_arch_prefix)LIBART_TARGET_BOOT_ART_EXTRA_INSTALLED_FILES := $(addprefix $(dir $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE)),\
|
||||
$(LIBART_TARGET_BOOT_ART_EXTRA_FILES))
|
||||
|
||||
# Compile boot.oat as position-independent code if WITH_DEXPREOPT_PIC=true
|
||||
ifeq (true,$(WITH_DEXPREOPT_PIC))
|
||||
|
@ -40,10 +42,18 @@ ifneq ($(COMPILED_CLASSES),)
|
|||
COMPILED_CLASSES_FLAGS := --compiled-classes=$(COMPILED_CLASSES)
|
||||
endif
|
||||
|
||||
# The rule to install boot.art and boot.oat
|
||||
$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) : $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) | $(ACP)
|
||||
$(hide) $(ACP) -fp $(dir $<)/*.art $(dir $@)
|
||||
$(hide) $(ACP) -fp $(dir $<)/*.oat $(dir $@)
|
||||
# The rule to install boot.art
|
||||
# Depends on installed boot.oat, boot-*.art, boot-*.oat
|
||||
$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) : $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) | $(ACP) $($(my_2nd_arch_prefix)LIBART_TARGET_BOOT_ART_EXTRA_INSTALLED_FILES)
|
||||
@echo "Install: $@"
|
||||
$(copy-file-to-target)
|
||||
|
||||
# The rule to install boot.oat, boot-*.art, boot-*.oat
|
||||
# Depends on built-but-not-installed boot.art
|
||||
$($(my_2nd_arch_prefix)LIBART_TARGET_BOOT_ART_EXTRA_INSTALLED_FILES) : $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) | $(ACP)
|
||||
@echo "Install: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) $(ACP) -fp $(dir $<)$(notdir $@) $@
|
||||
|
||||
$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME): PRIVATE_2ND_ARCH_VAR_PREFIX := $(my_2nd_arch_prefix)
|
||||
# Use dex2oat debug version for better error reporting
|
||||
|
|
Loading…
Reference in New Issue