Merge "Add a flag to select the apex boot image for preopt."

am: b82b26456b

Change-Id: I36baf7040c04428f53fb373f7391ac5e0b65a4e0
This commit is contained in:
Nicolas Geoffray 2019-03-08 10:11:11 -08:00 committed by android-build-merger
commit e39cf6a200

View file

@ -117,6 +117,10 @@ endif
my_dexpreopt_archs :=
my_dexpreopt_images :=
my_dexpreopt_infix := boot
ifeq (true, $(DEXPREOPT_USE_APEX_IMAGE))
my_dexpreopt_infix := apex
endif
ifdef LOCAL_DEX_PREOPT
ifeq (,$(filter PRESIGNED,$(LOCAL_CERTIFICATE)))
@ -150,13 +154,13 @@ ifdef LOCAL_DEX_PREOPT
# #################################################
# Odex for the 1st arch
my_dexpreopt_archs += $(TARGET_ARCH)
my_dexpreopt_images += $(DEXPREOPT_IMAGE_boot_$(TARGET_ARCH))
my_dexpreopt_images += $(DEXPREOPT_IMAGE_$(my_dexpreopt_infix)_$(TARGET_ARCH))
# Odex for the 2nd arch
ifdef TARGET_2ND_ARCH
ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
ifneq (first,$(my_module_multilib))
my_dexpreopt_archs += $(TARGET_2ND_ARCH)
my_dexpreopt_images += $(DEXPREOPT_IMAGE_boot_$(TARGET_2ND_ARCH))
my_dexpreopt_images += $(DEXPREOPT_IMAGE_$(my_dexpreopt_infix)_$(TARGET_2ND_ARCH))
endif # my_module_multilib is not first.
endif # TARGET_TRANSLATE_2ND_ARCH not true
endif # TARGET_2ND_ARCH
@ -166,13 +170,15 @@ ifdef LOCAL_DEX_PREOPT
# Save the module multilib since setup_one_odex modifies it.
my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
my_dexpreopt_archs += $(TARGET_$(my_2nd_arch_prefix)ARCH)
my_dexpreopt_images += $(DEXPREOPT_IMAGE_boot_$(TARGET_$(my_2nd_arch_prefix)ARCH))
my_dexpreopt_images += \
$(DEXPREOPT_IMAGE_$(my_dexpreopt_infix)_$(TARGET_$(my_2nd_arch_prefix)ARCH))
ifdef TARGET_2ND_ARCH
ifeq ($(my_module_multilib),both)
# The non-preferred arch
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_images += $(DEXPREOPT_IMAGE_boot_$(TARGET_$(my_2nd_arch_prefix)ARCH))
my_dexpreopt_images += \
$(DEXPREOPT_IMAGE_$(my_dexpreopt_infix)_$(TARGET_$(my_2nd_arch_prefix)ARCH))
endif # LOCAL_MULTILIB is both
endif # TARGET_2ND_ARCH
endif # LOCAL_MODULE_CLASS