forked from openkylin/platform_build
Support for install multiple boot images.
Bug: 119800099 Test: m && /system/framework/arm/apex*.art files exist Change-Id: I78023f1086446c2c44ff6b282993537b053c0588
This commit is contained in:
parent
299ffb7870
commit
269bc741a5
|
@ -13,7 +13,10 @@ 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
|
||||||
|
|
||||||
include $(BUILD_SYSTEM)/dex_preopt_libart.mk
|
# Install boot images. Note that there can be multiple.
|
||||||
|
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
|
boot_profile_jars_zip := $(PRODUCT_OUT)/boot_profile_jars.zip
|
||||||
bootclasspath_jars := $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES)
|
bootclasspath_jars := $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES)
|
||||||
|
|
|
@ -91,6 +91,7 @@ ifeq ($(WRITE_SOONG_VARIABLES),true)
|
||||||
$(call add_json_bool, DisablePreopt, $(call invert_bool,$(filter true,$(WITH_DEXPREOPT))))
|
$(call add_json_bool, DisablePreopt, $(call invert_bool,$(filter true,$(WITH_DEXPREOPT))))
|
||||||
$(call add_json_list, DisablePreoptModules, $(DEXPREOPT_DISABLED_MODULES))
|
$(call add_json_list, DisablePreoptModules, $(DEXPREOPT_DISABLED_MODULES))
|
||||||
$(call add_json_bool, OnlyPreoptBootImageAndSystemServer, $(filter true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY)))
|
$(call add_json_bool, OnlyPreoptBootImageAndSystemServer, $(filter true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY)))
|
||||||
|
$(call add_json_bool, GenerateApexImage, $(filter true,$(DEXPREOPT_GENERATE_APEX_IMAGE)))
|
||||||
$(call add_json_bool, DontUncompressPrivAppsDex, $(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS)))
|
$(call add_json_bool, DontUncompressPrivAppsDex, $(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS)))
|
||||||
$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
|
$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
|
||||||
$(call add_json_bool, HasSystemOther, $(BOARD_USES_SYSTEM_OTHER_ODEX))
|
$(call add_json_bool, HasSystemOther, $(BOARD_USES_SYSTEM_OTHER_ODEX))
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
####################################
|
####################################
|
||||||
# dexpreopt support for ART
|
# ART boot image installation
|
||||||
|
# Input variable:
|
||||||
|
# my_boot_image_name: the boot image to install
|
||||||
#
|
#
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
|
@ -10,7 +12,7 @@ ALL_DEFAULT_INSTALLED_MODULES += $(my_installed)
|
||||||
|
|
||||||
# Install primary arch vdex files into a shared location, and then symlink them to both the primary
|
# Install primary arch vdex files into a shared location, and then symlink them to both the primary
|
||||||
# and secondary arch directories.
|
# and secondary arch directories.
|
||||||
my_vdex_copy_pairs := $(DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_$(TARGET_ARCH))
|
my_vdex_copy_pairs := $(DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_$(my_boot_image_name)_$(TARGET_ARCH))
|
||||||
my_installed := $(foreach v,$(my_vdex_copy_pairs),$(PRODUCT_OUT)$(call word-colon,2,$(v)))
|
my_installed := $(foreach v,$(my_vdex_copy_pairs),$(PRODUCT_OUT)$(call word-colon,2,$(v)))
|
||||||
$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed))
|
$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed))
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
# Rules to install boot.art built by dexpreopt_bootjars.go
|
# Rules to install a boot image built by dexpreopt_bootjars.go
|
||||||
# Input variables:
|
# Input variables:
|
||||||
|
# my_boot_image_name: the boot image to install
|
||||||
# my_2nd_arch_prefix: indicates if this is to build for the 2nd arch.
|
# my_2nd_arch_prefix: indicates if this is to build for the 2nd arch.
|
||||||
# my_dexpreopt_image_extra_deps: extra dependencies to add on the installed boot.art
|
# my_dexpreopt_image_extra_deps: extra dependencies to add on the installed boot.art
|
||||||
|
|
||||||
# Install the boot images compiled by Soong
|
# Install the boot images compiled by Soong
|
||||||
# The first file (generally boot.art) is saved as DEFAULT_DEX_PREOPT_INSTALLED_IMAGE,
|
# The first file (generally boot.art) is saved as DEFAULT_DEX_PREOPT_INSTALLED_IMAGE,
|
||||||
# and the rest are added as dependencies of the first.
|
# and the rest are added as dependencies of the first.
|
||||||
my_installed := $(call copy-many-files,$(DEXPREOPT_IMAGE_BUILT_INSTALLED_$(TARGET_$(my_2nd_arch_prefix)ARCH)),$(PRODUCT_OUT))
|
|
||||||
|
my_installed := $(call copy-many-files,$(DEXPREOPT_IMAGE_BUILT_INSTALLED_$(my_boot_image_name)_$(TARGET_$(my_2nd_arch_prefix)ARCH)),$(PRODUCT_OUT))
|
||||||
$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed))
|
$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed))
|
||||||
$(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE := $(firstword $(my_installed))
|
$(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE += $(firstword $(my_installed))
|
||||||
|
|
||||||
# Install the unstripped boot images compiled by Soong into the symbols directory
|
# Install the unstripped boot images compiled by Soong into the symbols directory
|
||||||
# The first file (generally boot.art) made a dependency of DEFAULT_DEX_PREOPT_INSTALLED_IMAGE,
|
# The first file (generally boot.art) made a dependency of DEFAULT_DEX_PREOPT_INSTALLED_IMAGE,
|
||||||
# and the rest are added as dependencies of the first.
|
# and the rest are added as dependencies of the first.
|
||||||
my_installed := $(call copy-many-files,$(DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_$(TARGET_$(my_2nd_arch_prefix)ARCH)),$(TARGET_OUT_UNSTRIPPED))
|
my_installed := $(call copy-many-files,$(DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_$(my_boot_image_name)_$(TARGET_$(my_2nd_arch_prefix)ARCH)),$(TARGET_OUT_UNSTRIPPED))
|
||||||
$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed))
|
$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed))
|
||||||
$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE): $(firstword $(my_installed))
|
$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE): $(firstword $(my_installed))
|
||||||
|
|
||||||
|
|
|
@ -150,13 +150,13 @@ ifdef LOCAL_DEX_PREOPT
|
||||||
# #################################################
|
# #################################################
|
||||||
# Odex for the 1st arch
|
# Odex for the 1st arch
|
||||||
my_dexpreopt_archs += $(TARGET_ARCH)
|
my_dexpreopt_archs += $(TARGET_ARCH)
|
||||||
my_dexpreopt_images += $(DEXPREOPT_IMAGE_$(TARGET_ARCH))
|
my_dexpreopt_images += $(DEXPREOPT_IMAGE_boot_$(TARGET_ARCH))
|
||||||
# Odex for the 2nd arch
|
# Odex for the 2nd arch
|
||||||
ifdef TARGET_2ND_ARCH
|
ifdef TARGET_2ND_ARCH
|
||||||
ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
|
ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
|
||||||
ifneq (first,$(my_module_multilib))
|
ifneq (first,$(my_module_multilib))
|
||||||
my_dexpreopt_archs += $(TARGET_2ND_ARCH)
|
my_dexpreopt_archs += $(TARGET_2ND_ARCH)
|
||||||
my_dexpreopt_images += $(DEXPREOPT_IMAGE_$(TARGET_2ND_ARCH))
|
my_dexpreopt_images += $(DEXPREOPT_IMAGE_boot_$(TARGET_2ND_ARCH))
|
||||||
endif # my_module_multilib is not first.
|
endif # my_module_multilib is not first.
|
||||||
endif # TARGET_TRANSLATE_2ND_ARCH not true
|
endif # TARGET_TRANSLATE_2ND_ARCH not true
|
||||||
endif # TARGET_2ND_ARCH
|
endif # TARGET_2ND_ARCH
|
||||||
|
@ -166,13 +166,13 @@ ifdef LOCAL_DEX_PREOPT
|
||||||
# Save the module multilib since setup_one_odex modifies it.
|
# Save the module multilib since setup_one_odex modifies it.
|
||||||
my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
|
my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
|
||||||
my_dexpreopt_archs += $(TARGET_$(my_2nd_arch_prefix)ARCH)
|
my_dexpreopt_archs += $(TARGET_$(my_2nd_arch_prefix)ARCH)
|
||||||
my_dexpreopt_images += $(DEXPREOPT_IMAGE_$(TARGET_$(my_2nd_arch_prefix)ARCH))
|
my_dexpreopt_images += $(DEXPREOPT_IMAGE_boot_$(TARGET_$(my_2nd_arch_prefix)ARCH))
|
||||||
ifdef TARGET_2ND_ARCH
|
ifdef TARGET_2ND_ARCH
|
||||||
ifeq ($(my_module_multilib),both)
|
ifeq ($(my_module_multilib),both)
|
||||||
# The non-preferred arch
|
# The non-preferred arch
|
||||||
my_2nd_arch_prefix := $(if $(LOCAL_2ND_ARCH_VAR_PREFIX),,$(TARGET_2ND_ARCH_VAR_PREFIX))
|
my_2nd_arch_prefix := $(if $(LOCAL_2ND_ARCH_VAR_PREFIX),,$(TARGET_2ND_ARCH_VAR_PREFIX))
|
||||||
my_dexpreopt_archs += $(TARGET_$(my_2nd_arch_prefix)ARCH)
|
my_dexpreopt_archs += $(TARGET_$(my_2nd_arch_prefix)ARCH)
|
||||||
my_dexpreopt_images += $(DEXPREOPT_IMAGE_$(TARGET_$(my_2nd_arch_prefix)ARCH))
|
my_dexpreopt_images += $(DEXPREOPT_IMAGE_boot_$(TARGET_$(my_2nd_arch_prefix)ARCH))
|
||||||
endif # LOCAL_MULTILIB is both
|
endif # LOCAL_MULTILIB is both
|
||||||
endif # TARGET_2ND_ARCH
|
endif # TARGET_2ND_ARCH
|
||||||
endif # LOCAL_MODULE_CLASS
|
endif # LOCAL_MODULE_CLASS
|
||||||
|
|
Loading…
Reference in New Issue