forked from openkylin/platform_build
Merge "Add support for preopted app images" am: 8d0b35cf85
am: ce08de32d3
Change-Id: I0b8b60dbc921a3ac168fc03afb9647cfd4a6e73a
This commit is contained in:
commit
04c3d78e83
|
@ -124,5 +124,6 @@ $(hide) ANDROID_LOG_TAGS="*:e" $(DEX2OAT) \
|
|||
--abort-on-hard-verifier-error \
|
||||
--no-inline-from=core-oj.jar \
|
||||
$(PRIVATE_DEX_PREOPT_FLAGS) \
|
||||
$(PRIVATE_ART_FILE_PREOPT_FLAGS) \
|
||||
$(GLOBAL_DEXPREOPT_FLAGS)
|
||||
endef
|
||||
|
|
|
@ -50,10 +50,14 @@ endif
|
|||
|
||||
built_odex :=
|
||||
built_vdex :=
|
||||
built_art :=
|
||||
installed_odex :=
|
||||
installed_vdex :=
|
||||
installed_art :=
|
||||
built_installed_odex :=
|
||||
built_installed_vdex :=
|
||||
built_installed_art :=
|
||||
|
||||
ifdef LOCAL_DEX_PREOPT
|
||||
dexpreopt_boot_jar_module := $(filter $(DEXPREOPT_BOOT_JARS_MODULES),$(LOCAL_MODULE))
|
||||
ifdef dexpreopt_boot_jar_module
|
||||
|
@ -103,8 +107,10 @@ endif # boot jar
|
|||
|
||||
built_odex := $(strip $(built_odex))
|
||||
built_vdex := $(strip $(built_vdex))
|
||||
built_art := $(strip $(built_art))
|
||||
installed_odex := $(strip $(installed_odex))
|
||||
installed_vdex := $(strip $(installed_vdex))
|
||||
installed_art := $(strip $(installed_art))
|
||||
|
||||
ifdef built_odex
|
||||
ifndef LOCAL_DEX_PREOPT_FLAGS
|
||||
|
@ -113,16 +119,18 @@ ifndef LOCAL_DEX_PREOPT_FLAGS
|
|||
LOCAL_DEX_PREOPT_FLAGS := $(PRODUCT_DEX_PREOPT_DEFAULT_FLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(built_odex): PRIVATE_DEX_PREOPT_FLAGS := $(LOCAL_DEX_PREOPT_FLAGS)
|
||||
$(built_vdex): $(built_odex)
|
||||
$(built_art): $(built_odex)
|
||||
endif
|
||||
|
||||
# Add the installed_odex to the list of installed files for this module.
|
||||
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_odex)
|
||||
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_vdex)
|
||||
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_art)
|
||||
ALL_MODULES.$(my_register_name).BUILT_INSTALLED += $(built_installed_odex)
|
||||
ALL_MODULES.$(my_register_name).BUILT_INSTALLED += $(built_installed_vdex)
|
||||
ALL_MODULES.$(my_register_name).BUILT_INSTALLED += $(built_installed_art)
|
||||
|
||||
# Record dex-preopt config.
|
||||
DEXPREOPT.$(LOCAL_MODULE).DEX_PREOPT := $(LOCAL_DEX_PREOPT)
|
||||
|
@ -138,6 +146,6 @@ DEXPREOPT.MODULES.$(LOCAL_MODULE_CLASS) := $(sort \
|
|||
|
||||
|
||||
# Make sure to install the .odex and .vdex when you run "make <module_name>"
|
||||
$(my_all_targets): $(installed_odex) $(installed_vdex)
|
||||
$(my_all_targets): $(installed_odex) $(installed_vdex) $(installed_art)
|
||||
|
||||
endif # LOCAL_DEX_PREOPT
|
||||
|
|
|
@ -289,7 +289,8 @@ _product_stash_var_list += \
|
|||
_product_stash_var_list += \
|
||||
DEFAULT_SYSTEM_DEV_CERTIFICATE \
|
||||
WITH_DEXPREOPT \
|
||||
WITH_DEXPREOPT_BOOT_IMG_ONLY
|
||||
WITH_DEXPREOPT_BOOT_IMG_ONLY \
|
||||
WITH_DEXPREOPT_APP_IMAGE
|
||||
|
||||
#
|
||||
# Mark the variables in _product_stash_var_list as readonly
|
||||
|
|
|
@ -36,6 +36,17 @@ my_installed_odex := $(call get-odex-installed-file-path,$($(my_2nd_arch_prefix)
|
|||
|
||||
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))
|
||||
|
||||
ifeq (true,$(WITH_DEXPREOPT_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)))
|
||||
|
|
Loading…
Reference in New Issue