Merge "Move dexpreopt image selection out of dexpreopt_gen"
am: 8f4e0f2939
Change-Id: I55321f2af249bf5a7c2c644b7dc6408439be3ecd
This commit is contained in:
commit
5755b02cfe
3 changed files with 10 additions and 14 deletions
|
@ -55,7 +55,6 @@ LOCAL_CXX_STL := default
|
|||
LOCAL_DEX_PREOPT_APP_IMAGE:=
|
||||
LOCAL_DEX_PREOPT_FLAGS:=
|
||||
LOCAL_DEX_PREOPT_GENERATE_PROFILE:=
|
||||
LOCAL_DEX_PREOPT_IMAGE_LOCATION:=
|
||||
LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING:=
|
||||
LOCAL_DEX_PREOPT:= # '',true,false,nostripping
|
||||
LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG:=
|
||||
|
|
|
@ -147,10 +147,10 @@ ifeq ($(WRITE_SOONG_VARIABLES),true)
|
|||
$(call add_json_str, Dex2oatXms, $(DEX2OAT_XMS))
|
||||
$(call add_json_str, EmptyDirectory, $(OUT_DIR)/empty)
|
||||
|
||||
$(call add_json_map, DefaultDexPreoptImageLocation)
|
||||
$(call add_json_str, $(TARGET_ARCH), $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION))
|
||||
$(call add_json_map, DefaultDexPreoptImage)
|
||||
$(call add_json_str, $(TARGET_ARCH), $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME))
|
||||
ifdef TARGET_2ND_ARCH
|
||||
$(call add_json_str, $(TARGET_2ND_ARCH), $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION))
|
||||
$(call add_json_str, $(TARGET_2ND_ARCH), $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME))
|
||||
endif
|
||||
$(call end_json_map)
|
||||
|
||||
|
@ -208,12 +208,5 @@ DEXPREOPT_GEN_DEPS := \
|
|||
|
||||
DEXPREOPT_GEN_DEPS += $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES)
|
||||
|
||||
DEXPREOPT_GEN_DEPS += $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
|
||||
ifdef TARGET_2ND_ARCH
|
||||
ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
|
||||
DEXPREOPT_GEN_DEPS += $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
|
||||
endif
|
||||
endif
|
||||
|
||||
DEXPREOPT_STRIP_DEPS := \
|
||||
$(ZIP2ZIP) \
|
||||
|
|
|
@ -117,6 +117,7 @@ ifeq (,$(LOCAL_ENFORCE_USES_LIBRARIES))
|
|||
endif
|
||||
|
||||
my_dexpreopt_archs :=
|
||||
my_dexpreopt_images :=
|
||||
|
||||
ifdef LOCAL_DEX_PREOPT
|
||||
ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
|
||||
|
@ -139,11 +140,13 @@ ifdef LOCAL_DEX_PREOPT
|
|||
# #################################################
|
||||
# Odex for the 1st arch
|
||||
my_dexpreopt_archs += $(TARGET_ARCH)
|
||||
my_dexpreopt_images += $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
|
||||
# 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 += $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
|
||||
endif # my_module_multilib is not first.
|
||||
endif # TARGET_TRANSLATE_2ND_ARCH not true
|
||||
endif # TARGET_2ND_ARCH
|
||||
|
@ -153,11 +156,13 @@ 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 += $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
|
||||
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 += $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
|
||||
endif # LOCAL_MULTILIB is both
|
||||
endif # TARGET_2ND_ARCH
|
||||
endif # LOCAL_MODULE_CLASS
|
||||
|
@ -194,7 +199,7 @@ ifdef LOCAL_DEX_PREOPT
|
|||
$(call add_json_str, $(lib), $(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/javalib.jar))
|
||||
$(call end_json_map)
|
||||
$(call add_json_list, Archs, $(my_dexpreopt_archs))
|
||||
$(call add_json_str, DexPreoptImageLocation, $(LOCAL_DEX_PREOPT_IMAGE_LOCATION))
|
||||
$(call add_json_list, DexPreoptImages, $(my_dexpreopt_images))
|
||||
$(call add_json_bool, PreoptExtractedApk, $(my_preopt_for_extracted_apk))
|
||||
$(call add_json_bool, NoCreateAppImage, $(filter false,$(LOCAL_DEX_PREOPT_APP_IMAGE)))
|
||||
$(call add_json_bool, ForceCreateAppImage, $(filter true,$(LOCAL_DEX_PREOPT_APP_IMAGE)))
|
||||
|
@ -234,8 +239,7 @@ ifdef LOCAL_DEX_PREOPT
|
|||
my_dexpreopt_deps += \
|
||||
$(foreach lib,$(sort $(LOCAL_USES_LIBRARIES) $(LOCAL_OPTIONAL_USES_LIBRARIES) org.apache.http.legacy android.hidl.base-V1.0-java android.hidl.manager-V1.0-java),\
|
||||
$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/javalib.jar)
|
||||
my_dexpreopt_deps += $(LOCAL_DEX_PREOPT_IMAGE_LOCATION)
|
||||
# TODO: default boot images
|
||||
my_dexpreopt_deps += $(my_dexpreopt_images)
|
||||
|
||||
$(my_dexpreopt_zip): PRIVATE_MODULE := $(LOCAL_MODULE)
|
||||
$(my_dexpreopt_zip): $(my_dexpreopt_deps)
|
||||
|
|
Loading…
Reference in a new issue