Move the dexpreopting logic into Soong. Make modules will be dexpreopted by executing the Soong logic in the standalone dexpreopt_gen binary, which will generate scripts that will perform dexpreopting for each module. Export global configuration as JSON to $OUT/dexpreopt.config, which will be used by dexpreopt_gen and Soong, and per-module JSON configuration that will be used by dexpreopt_gen. This relands I59b20c931ee3e5a8d35eb30da4148691c5095502, I39d580999947ee54cfefe875b57a028be5333bd7, Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2 and Ica006a007d112c232311435aaac0c0e476232b67, with a minor update to match the changes made to dexpreopt_gen arguments and a fix to correctly keep dexpreopt disabled on mac builds. Bug: 119412419 Bug: 120273280 Test: no differences to dexpreopt outputs on aosp_sailfish system/, only expected changes to dexpreopt outputs on system_other (.vdex files for privileged Soong modules no longer incorrectly contain .dex contents). Change-Id: I25163e91886cea6941afa25cdb529ed053278dcbgugelfrei-debug
parent
ab84792815
commit
6db5b0ea9a
@ -0,0 +1,200 @@
|
||||
DEX_PREOPT_CONFIG := $(PRODUCT_OUT)/dexpreopt.config
|
||||
|
||||
# list of boot classpath jars for dexpreopt
|
||||
DEXPREOPT_BOOT_JARS := $(subst $(space),:,$(PRODUCT_BOOT_JARS))
|
||||
DEXPREOPT_BOOT_JARS_MODULES := $(PRODUCT_BOOT_JARS)
|
||||
PRODUCT_BOOTCLASSPATH := $(subst $(space),:,$(foreach m,$(DEXPREOPT_BOOT_JARS_MODULES),/system/framework/$(m).jar))
|
||||
|
||||
PRODUCT_SYSTEM_SERVER_CLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),/system/framework/$(m).jar))
|
||||
|
||||
DEXPREOPT_BUILD_DIR := $(OUT_DIR)
|
||||
DEXPREOPT_PRODUCT_DIR_FULL_PATH := $(PRODUCT_OUT)/dex_bootjars
|
||||
DEXPREOPT_PRODUCT_DIR := $(patsubst $(DEXPREOPT_BUILD_DIR)/%,%,$(DEXPREOPT_PRODUCT_DIR_FULL_PATH))
|
||||
DEXPREOPT_BOOT_JAR_DIR := system/framework
|
||||
DEXPREOPT_BOOT_JAR_DIR_FULL_PATH := $(DEXPREOPT_PRODUCT_DIR_FULL_PATH)/$(DEXPREOPT_BOOT_JAR_DIR)
|
||||
|
||||
DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/boot.art
|
||||
DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(DEX2OAT_TARGET_ARCH)/boot.art
|
||||
|
||||
ifdef TARGET_2ND_ARCH
|
||||
$(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/boot.art
|
||||
$(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/boot.art
|
||||
endif
|
||||
|
||||
# The default value for LOCAL_DEX_PREOPT
|
||||
DEX_PREOPT_DEFAULT ?= true
|
||||
|
||||
# The default filter for which files go into the system_other image (if it is
|
||||
# being used). To bundle everything one should set this to '%'
|
||||
SYSTEM_OTHER_ODEX_FILTER ?= \
|
||||
app/% \
|
||||
priv-app/% \
|
||||
product_services/app/% \
|
||||
product_services/priv-app/% \
|
||||
product/app/% \
|
||||
product/priv-app/% \
|
||||
|
||||
# The default values for pre-opting: always preopt PIC.
|
||||
# Conditional to building on linux, as dex2oat currently does not work on darwin.
|
||||
ifeq ($(HOST_OS),linux)
|
||||
WITH_DEXPREOPT ?= true
|
||||
ifeq (eng,$(TARGET_BUILD_VARIANT))
|
||||
# Don't strip for quick development turnarounds.
|
||||
DEX_PREOPT_DEFAULT := nostripping
|
||||
# For an eng build only pre-opt the boot image and system server. This gives reasonable performance
|
||||
# and still allows a simple workflow: building in frameworks/base and syncing.
|
||||
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY ?= true
|
||||
endif
|
||||
# Add mini-debug-info to the boot classpath unless explicitly asked not to.
|
||||
ifneq (false,$(WITH_DEXPREOPT_DEBUG_INFO))
|
||||
PRODUCT_DEX_PREOPT_BOOT_FLAGS += --generate-mini-debug-info
|
||||
endif
|
||||
|
||||
# Non eng linux builds must have preopt enabled so that system server doesn't run as interpreter
|
||||
# only. b/74209329
|
||||
ifeq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
|
||||
ifneq (true,$(WITH_DEXPREOPT))
|
||||
ifneq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY))
|
||||
$(call pretty-error, DEXPREOPT must be enabled for user and userdebug builds)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Default to debug version to help find bugs.
|
||||
# Set USE_DEX2OAT_DEBUG to false for only building non-debug versions.
|
||||
ifeq ($(USE_DEX2OAT_DEBUG),false)
|
||||
DEX2OAT := $(HOST_OUT_EXECUTABLES)/dex2oat$(HOST_EXECUTABLE_SUFFIX)
|
||||
else
|
||||
DEX2OAT := $(HOST_OUT_EXECUTABLES)/dex2oatd$(HOST_EXECUTABLE_SUFFIX)
|
||||
endif
|
||||
|
||||
DEX2OAT_DEPENDENCY += $(DEX2OAT)
|
||||
|
||||
# Use the first preloaded-classes file in PRODUCT_COPY_FILES.
|
||||
PRELOADED_CLASSES := $(call word-colon,1,$(firstword \
|
||||
$(filter %system/etc/preloaded-classes,$(PRODUCT_COPY_FILES))))
|
||||
|
||||
# Use the first dirty-image-objects file in PRODUCT_COPY_FILES.
|
||||
DIRTY_IMAGE_OBJECTS := $(call word-colon,1,$(firstword \
|
||||
$(filter %system/etc/dirty-image-objects,$(PRODUCT_COPY_FILES))))
|
||||
|
||||
define get-product-default-property
|
||||
$(strip \
|
||||
$(eval _prop := $(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))))\
|
||||
$(if $(_prop),$(_prop),$(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_SYSTEM_DEFAULT_PROPERTIES)))))
|
||||
endef
|
||||
|
||||
DEX2OAT_IMAGE_XMS := $(call get-product-default-property,dalvik.vm.image-dex2oat-Xms)
|
||||
DEX2OAT_IMAGE_XMX := $(call get-product-default-property,dalvik.vm.image-dex2oat-Xmx)
|
||||
DEX2OAT_XMS := $(call get-product-default-property,dalvik.vm.dex2oat-Xms)
|
||||
DEX2OAT_XMX := $(call get-product-default-property,dalvik.vm.dex2oat-Xmx)
|
||||
|
||||
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64))
|
||||
# MIPS specific overrides.
|
||||
# For MIPS the ART image is loaded at a lower address. This causes issues
|
||||
# with the image overlapping with memory on the host cross-compiling and
|
||||
# building the image. We therefore limit the Xmx value. This isn't done
|
||||
# via a property as we want the larger Xmx value if we're running on a
|
||||
# MIPS device.
|
||||
DEX2OAT_XMX := 128m
|
||||
endif
|
||||
|
||||
ifeq ($(WRITE_SOONG_VARIABLES),true)
|
||||
|
||||
$(call json_start)
|
||||
|
||||
$(call add_json_bool, DefaultNoStripping, $(filter nostripping,$(DEX_PREOPT_DEFAULT)))
|
||||
$(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, DontUncompressPrivAppsDex, $(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS)))
|
||||
$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
|
||||
$(call add_json_bool, HasSystemOther, $(BOARD_USES_SYSTEM_OTHER_ODEX))
|
||||
$(call add_json_list, PatternsOnSystemOther, $(SYSTEM_OTHER_ODEX_FILTER))
|
||||
$(call add_json_bool, DisableGenerateProfile, $(filter false,$(WITH_DEX_PREOPT_GENERATE_PROFILE)))
|
||||
$(call add_json_list, BootJars, $(DEXPREOPT_BOOT_JARS_MODULES))
|
||||
$(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS))
|
||||
$(call add_json_list, SystemServerApps, $(PRODUCT_SYSTEM_SERVER_APPS))
|
||||
$(call add_json_list, SpeedApps, $(PRODUCT_DEXPREOPT_SPEED_APPS))
|
||||
$(call add_json_list, PreoptFlags, $(PRODUCT_DEX_PREOPT_DEFAULT_FLAGS))
|
||||
$(call add_json_str, DefaultCompilerFilter, $(PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER))
|
||||
$(call add_json_str, SystemServerCompilerFilter, $(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER))
|
||||
$(call add_json_bool, GenerateDmFiles, $(PRODUCT_DEX_PREOPT_GENERATE_DM_FILES))
|
||||
$(call add_json_bool, NoDebugInfo, $(filter false,$(WITH_DEXPREOPT_DEBUG_INFO)))
|
||||
$(call add_json_bool, AlwaysSystemServerDebugInfo, $(filter true,$(PRODUCT_SYSTEM_SERVER_DEBUG_INFO)))
|
||||
$(call add_json_bool, NeverSystemServerDebugInfo, $(filter false,$(PRODUCT_SYSTEM_SERVER_DEBUG_INFO)))
|
||||
$(call add_json_bool, AlwaysOtherDebugInfo, $(filter true,$(PRODUCT_OTHER_JAVA_DEBUG_INFO)))
|
||||
$(call add_json_bool, NeverOtherDebugInfo, $(filter false,$(PRODUCT_OTHER_JAVA_DEBUG_INFO)))
|
||||
$(call add_json_list, MissingUsesLibraries, $(INTERNAL_PLATFORM_MISSING_USES_LIBRARIES))
|
||||
$(call add_json_bool, IsEng, $(filter eng,$(TARGET_BUILD_VARIANT)))
|
||||
$(call add_json_bool, SanitizeLite, $(SANITIZE_LITE))
|
||||
$(call add_json_bool, DefaultAppImages, $(WITH_DEX_PREOPT_APP_IMAGE))
|
||||
$(call add_json_str, Dex2oatXmx, $(DEX2OAT_XMX))
|
||||
$(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))
|
||||
ifdef TARGET_2ND_ARCH
|
||||
$(call add_json_str, $(TARGET_2ND_ARCH), $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION))
|
||||
endif
|
||||
$(call end_json_map)
|
||||
|
||||
$(call add_json_map, CpuVariant)
|
||||
$(call add_json_str, $(TARGET_ARCH), $(DEX2OAT_TARGET_CPU_VARIANT))
|
||||
ifdef TARGET_2ND_ARCH
|
||||
$(call add_json_str, $(TARGET_2ND_ARCH), $($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT))
|
||||
endif
|
||||
$(call end_json_map)
|
||||
|
||||
$(call add_json_map, InstructionSetFeatures)
|
||||
$(call add_json_str, $(TARGET_ARCH), $(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES))
|
||||
ifdef TARGET_2ND_ARCH
|
||||
$(call add_json_str, $(TARGET_2ND_ARCH), $($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES))
|
||||
endif
|
||||
$(call end_json_map)
|
||||
|
||||
$(call add_json_map, Tools)
|
||||
$(call add_json_str, Profman, $(PROFMAN))
|
||||
$(call add_json_str, Dex2oat, $(DEX2OAT))
|
||||
$(call add_json_str, Aapt, $(AAPT))
|
||||
$(call add_json_str, SoongZip, $(SOONG_ZIP))
|
||||
$(call add_json_str, Zip2zip, $(ZIP2ZIP))
|
||||
$(call add_json_str, VerifyUsesLibraries, $(BUILD_SYSTEM)/verify_uses_libraries.sh)
|
||||
$(call add_json_str, ConstructContext, $(BUILD_SYSTEM)/construct_context.sh)
|
||||
$(call end_json_map)
|
||||
|
||||
$(call json_end)
|
||||
|
||||
$(shell mkdir -p $(dir $(DEX_PREOPT_CONFIG)))
|
||||
$(file >$(DEX_PREOPT_CONFIG).tmp,$(json_contents))
|
||||
|
||||
$(shell \
|
||||
if ! cmp -s $(DEX_PREOPT_CONFIG).tmp $(DEX_PREOPT_CONFIG); then \
|
||||
mv $(DEX_PREOPT_CONFIG).tmp $(DEX_PREOPT_CONFIG); \
|
||||
else \
|
||||
rm $(DEX_PREOPT_CONFIG).tmp; \
|
||||
fi)
|
||||
endif
|
||||
|
||||
# Dummy rule to create dexpreopt.config, it will already have been created
|
||||
# by the $(file) call above, but a rule needs to exist to keep the dangling
|
||||
# rule check happy.
|
||||
$(DEX_PREOPT_CONFIG):
|
||||
@#empty
|
||||
|
||||
DEXPREOPT_GEN_DEPS := \
|
||||
$(PROFMAN) \
|
||||
$(DEX2OAT) \
|
||||
$(AAPT) \
|
||||
$(SOONG_ZIP) \
|
||||
$(ZIP2ZIP) \
|
||||
$(BUILD_SYSTEM)/verify_uses_libraries.sh \
|
||||
$(BUILD_SYSTEM)/construct_context.sh \
|
||||
|
||||
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
|
@ -1,140 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Set up variables and dependency for one odex file
|
||||
# Input variables: my_2nd_arch_prefix
|
||||
# Output(modified) variables: built_odex, installed_odex, built_installed_odex
|
||||
|
||||
my_built_odex := $(call get-odex-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(LOCAL_BUILT_MODULE))
|
||||
ifdef LOCAL_DEX_PREOPT_IMAGE_LOCATION
|
||||
my_dex_preopt_image_location := $(LOCAL_DEX_PREOPT_IMAGE_LOCATION)
|
||||
else
|
||||
my_dex_preopt_image_location := $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION)
|
||||
endif
|
||||
my_dex_preopt_image_filename := $(call get-image-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(my_dex_preopt_image_location))
|
||||
|
||||
# If LOCAL_ENFORCE_USES_LIBRARIES is not set, default to true if either of LOCAL_USES_LIBRARIES or
|
||||
# LOCAL_OPTIONAL_USES_LIBRARIES are specified.
|
||||
ifeq (,$(LOCAL_ENFORCE_USES_LIBRARIES))
|
||||
# Will change the default to true unconditionally in the future.
|
||||
ifneq (,$(LOCAL_OPTIONAL_USES_LIBRARIES))
|
||||
LOCAL_ENFORCE_USES_LIBRARIES := true
|
||||
endif
|
||||
ifneq (,$(LOCAL_USES_LIBRARIES))
|
||||
LOCAL_ENFORCE_USES_LIBRARIES := true
|
||||
endif
|
||||
endif
|
||||
|
||||
my_uses_libraries := $(LOCAL_USES_LIBRARIES)
|
||||
my_optional_uses_libraries := $(LOCAL_OPTIONAL_USES_LIBRARIES)
|
||||
my_missing_uses_libraries := $(INTERNAL_PLATFORM_MISSING_USES_LIBRARIES)
|
||||
|
||||
# If we have either optional or required uses-libraries, set up the class loader context
|
||||
# accordingly.
|
||||
my_lib_names :=
|
||||
my_optional_lib_names :=
|
||||
my_filtered_optional_uses_libraries :=
|
||||
my_system_dependencies :=
|
||||
my_stored_preopt_class_loader_context_libs :=
|
||||
my_conditional_uses_libraries_host :=
|
||||
my_conditional_uses_libraries_target :=
|
||||
|
||||
ifneq (true,$(LOCAL_ENFORCE_USES_LIBRARIES))
|
||||
# Pass special class loader context to skip the classpath and collision check.
|
||||
# This will get removed once LOCAL_USES_LIBRARIES is enforced.
|
||||
# Right now LOCAL_USES_LIBRARIES is opt in, for the case where it's not specified we still default
|
||||
# to the &.
|
||||
my_dex_preopt_class_loader_context := \&
|
||||
else
|
||||
# Compute the filtered optional uses libraries by removing ones that are not supposed to exist.
|
||||
my_filtered_optional_uses_libraries := \
|
||||
$(filter-out $(my_missing_uses_libraries), $(my_optional_uses_libraries))
|
||||
my_filtered_uses_libraries := $(my_uses_libraries) $(my_filtered_optional_uses_libraries)
|
||||
|
||||
# These are the ones we are verifying in the make rule, use the unfiltered libraries.
|
||||
my_lib_names := $(my_uses_libraries)
|
||||
my_optional_lib_names := $(my_optional_uses_libraries)
|
||||
|
||||
# Calculate system build dependencies based on the filtered libraries.
|
||||
my_intermediate_libs := $(foreach lib_name, $(my_lib_names) $(my_filtered_optional_uses_libraries), \
|
||||
$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib_name),,COMMON)/javalib.jar)
|
||||
my_dex_preopt_system_dependencies := $(my_intermediate_libs)
|
||||
my_dex_preopt_class_loader_context := $(call normalize-path-list,$(my_intermediate_libs))
|
||||
|
||||
# The class loader context checksums are filled in by dex2oat.
|
||||
my_stored_preopt_class_loader_context_libs := $(call normalize-path-list, \
|
||||
$(foreach lib_name,$(my_filtered_uses_libraries),/system/framework/$(lib_name).jar))
|
||||
|
||||
# Fix up org.apache.http.legacy.impl since it should be org.apache.http.legacy in the manifest.
|
||||
my_lib_names := $(patsubst org.apache.http.legacy.impl,org.apache.http.legacy,$(my_lib_names))
|
||||
my_optional_lib_names := $(patsubst org.apache.http.legacy.impl,org.apache.http.legacy,$(my_optional_lib_names))
|
||||
ifeq (,$(filter org.apache.http.legacy,$(my_lib_names) $(my_optional_lib_names)))
|
||||
my_conditional_uses_libraries_host := $(call intermediates-dir-for,JAVA_LIBRARIES,org.apache.http.legacy.impl,,COMMON)/javalib.jar
|
||||
my_conditional_uses_libraries_target := /system/framework/org.apache.http.legacy.impl.jar
|
||||
endif
|
||||
endif
|
||||
|
||||
$(my_built_odex): $(AAPT)
|
||||
$(my_built_odex): $(my_conditional_uses_libraries_host)
|
||||
$(my_built_odex): $(my_dex_preopt_system_dependencies)
|
||||
$(my_built_odex): PRIVATE_ENFORCE_USES_LIBRARIES := $(LOCAL_ENFORCE_USES_LIBRARIES)
|
||||
$(my_built_odex): PRIVATE_CONDITIONAL_USES_LIBRARIES_HOST := $(my_conditional_uses_libraries_host)
|
||||
$(my_built_odex): PRIVATE_CONDITIONAL_USES_LIBRARIES_TARGET := $(my_conditional_uses_libraries_target)
|
||||
$(my_built_odex): PRIVATE_USES_LIBRARY_NAMES := $(my_lib_names)
|
||||
$(my_built_odex): PRIVATE_OPTIONAL_USES_LIBRARY_NAMES := $(my_optional_lib_names)
|
||||
$(my_built_odex): PRIVATE_2ND_ARCH_VAR_PREFIX := $(my_2nd_arch_prefix)
|
||||
$(my_built_odex): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
|
||||
$(my_built_odex): PRIVATE_DEX_PREOPT_IMAGE_LOCATION := $(my_dex_preopt_image_location)
|
||||
$(my_built_odex): PRIVATE_DEX2OAT_CLASS_LOADER_CONTEXT := $(my_dex_preopt_class_loader_context)
|
||||
$(my_built_odex): PRIVATE_DEX2OAT_STORED_CLASS_LOADER_CONTEXT_LIBS := $(my_stored_preopt_class_loader_context_libs)
|
||||
$(my_built_odex) : $($(my_2nd_arch_prefix)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
|
||||
$(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \
|
||||
$(my_dex_preopt_image_filename)
|
||||
|
||||
my_installed_odex := $(call get-odex-installed-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE))
|
||||
|
||||
my_built_vdex := $(patsubst %.odex,%.vdex,$(my_built_odex))
|
||||
my_installed_vdex := $(patsubst %.odex,%.vdex,$(my_installed_odex))
|
||||
my_installed_art := $(patsubst %.odex,%.art,$(my_installed_odex))
|
||||
|
||||
ifndef LOCAL_DEX_PREOPT_APP_IMAGE
|
||||
# Local override not defined, use the global one.
|
||||
ifeq (true,$(WITH_DEX_PREOPT_APP_IMAGE))
|
||||
LOCAL_DEX_PREOPT_APP_IMAGE := true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (true,$(LOCAL_DEX_PREOPT_APP_IMAGE))
|
||||
my_built_art := $(patsubst %.odex,%.art,$(my_built_odex))
|
||||
$(my_built_odex): PRIVATE_ART_FILE_PREOPT_FLAGS := --app-image-file=$(my_built_art) \
|
||||
--image-format=lz4
|
||||
$(eval $(call copy-one-file,$(my_built_art),$(my_installed_art)))
|
||||
built_art += $(my_built_art)
|
||||
installed_art += $(my_installed_art)
|
||||
built_installed_art += $(my_built_art):$(my_installed_art)
|
||||
endif
|
||||
|
||||
$(eval $(call copy-one-file,$(my_built_odex),$(my_installed_odex)))
|
||||
$(eval $(call copy-one-file,$(my_built_vdex),$(my_installed_vdex)))
|
||||
|
||||
built_odex += $(my_built_odex)
|
||||
built_vdex += $(my_built_vdex)
|
||||
|
||||
installed_odex += $(my_installed_odex)
|
||||
installed_vdex += $(my_installed_vdex)
|
||||
|
||||
built_installed_odex += $(my_built_odex):$(my_installed_odex)
|
||||
built_installed_vdex += $(my_built_vdex):$(my_installed_vdex)
|
Loading…
Reference in new issue