Merge "Store dexpreopt.config files to dexpreopt_config.zip"

This commit is contained in:
Treehugger Robot 2021-04-23 06:47:57 +00:00 committed by Gerrit Code Review
commit 6edaa353b1
5 changed files with 34 additions and 0 deletions

View file

@ -5325,6 +5325,22 @@ $(APPCOMPAT_ZIP): $(SOONG_ZIP)
$(hide) find $(PRODUCT_OUT)/appcompat | sort >$(PRIVATE_LIST_FILE)
$(hide) $(SOONG_ZIP) -d -o $@ -C $(PRODUCT_OUT)/appcompat -l $(PRIVATE_LIST_FILE)
DEXPREOPT_CONFIG_ZIP := $(PRODUCT_OUT)/dexpreopt_config.zip
$(DEXPREOPT_CONFIG_ZIP): $(FULL_SYSTEMIMAGE_DEPS) \
$(INTERNAL_RAMDISK_FILES) \
$(INTERNAL_USERDATAIMAGE_FILES) \
$(INTERNAL_VENDORIMAGE_FILES) \
$(INTERNAL_PRODUCTIMAGE_FILES) \
$(INTERNAL_SYSTEM_EXTIMAGE_FILES) \
$(DEX_PREOPT_CONFIG_FOR_MAKE) \
$(DEX_PREOPT_SOONG_CONFIG_FOR_MAKE)
$(DEXPREOPT_CONFIG_ZIP): $(SOONG_ZIP)
$(hide) mkdir -p $(dir $@) $(PRODUCT_OUT)/dexpreopt_config
$(hide) cp $(DEX_PREOPT_CONFIG_FOR_MAKE) $(PRODUCT_OUT)/dexpreopt_config
$(hide) cp $(DEX_PREOPT_SOONG_CONFIG_FOR_MAKE) $(PRODUCT_OUT)/dexpreopt_config
$(hide) $(SOONG_ZIP) -d -o $@ -C $(PRODUCT_OUT)/dexpreopt_config -D $(PRODUCT_OUT)/dexpreopt_config
# -----------------------------------------------------------------
# A zip of the symbols directory. Keep the full paths to make it
# more obvious where these files came from.

View file

@ -399,6 +399,7 @@ ifdef LOCAL_DEX_PREOPT
$(call json_end)
my_dexpreopt_config := $(intermediates)/dexpreopt.config
my_dexpreopt_config_for_postprocessing := $(PRODUCT_OUT)/dexpreopt_config/$(LOCAL_MODULE)_dexpreopt.config
my_dexpreopt_script := $(intermediates)/dexpreopt.sh
my_dexpreopt_zip := $(intermediates)/dexpreopt.zip
my_dexpreopt_config_merger := $(BUILD_SYSTEM)/dex_preopt_config_merger.py
@ -428,6 +429,8 @@ ifdef LOCAL_DEX_PREOPT
-dexpreopt_script $@ \
-out_dir $(OUT_DIR)
$(eval $(call copy-one-file,$(my_dexpreopt_config),$(my_dexpreopt_config_for_postprocessing)))
my_dexpreopt_deps := $(my_dex_jar)
my_dexpreopt_deps += $(if $(my_process_profile),$(LOCAL_DEX_PREOPT_PROFILE))
my_dexpreopt_deps += \
@ -463,10 +466,12 @@ ifdef LOCAL_DEX_PREOPT
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD)
$(LOCAL_INSTALLED_MODULE): $(my_dexpreopt_zip)
$(LOCAL_INSTALLED_MODULE): $(my_dexpreopt_config_for_postprocessing)
$(my_all_targets): $(my_dexpreopt_zip)
my_dexpreopt_config :=
my_dexpreopt_script :=
my_dexpreopt_zip :=
my_dexpreopt_config_for_postprocessing :=
endif # LOCAL_DEX_PREOPT

View file

@ -1708,6 +1708,7 @@ else ifeq (,$(TARGET_BUILD_UNBUNDLED))
$(PROGUARD_USAGE_ZIP) \
$(COVERAGE_ZIP) \
$(APPCOMPAT_ZIP) \
$(DEXPREOPT_CONFIG_ZIP) \
$(INSTALLED_FILES_FILE) \
$(INSTALLED_FILES_JSON) \
$(INSTALLED_FILES_FILE_VENDOR) \

View file

@ -13,6 +13,7 @@
# LOCAL_SOONG_JNI_LIBS_$(TARGET_ARCH)
# LOCAL_SOONG_JNI_LIBS_$(TARGET_2ND_ARCH)
# LOCAL_SOONG_JNI_LIBS_SYMBOLS
# LOCAL_SOONG_DEXPREOPT_CONFIG
ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
$(call pretty-error,soong_app_prebuilt.mk may only be used from Soong)
@ -49,6 +50,14 @@ ifdef LOCAL_SOONG_CLASSES_JAR
.PHONY: javac-check-$(LOCAL_MODULE)
endif
ifdef LOCAL_SOONG_DEXPREOPT_CONFIG
my_dexpreopt_config := $(PRODUCT_OUT)/dexpreopt_config/$(LOCAL_MODULE)_dexpreopt.config
$(eval $(call copy-one-file,$(LOCAL_SOONG_DEXPREOPT_CONFIG), $(my_dexpreopt_config)))
$(LOCAL_BUILT_MODULE): $(my_dexpreopt_config)
endif
# Run veridex on product, system_ext and vendor modules.
# We skip it for unbundled app builds where we cannot build veridex.
module_run_appcompat :=

View file

@ -161,6 +161,9 @@ endif
# modules can find them.
ifdef LOCAL_SOONG_DEXPREOPT_CONFIG
$(eval $(call copy-one-file,$(LOCAL_SOONG_DEXPREOPT_CONFIG), $(call local-intermediates-dir,)/dexpreopt.config))
my_dexpreopt_config := $(PRODUCT_OUT)/dexpreopt_config/$(LOCAL_MODULE)_dexpreopt.config
$(eval $(call copy-one-file,$(LOCAL_SOONG_DEXPREOPT_CONFIG), $(my_dexpreopt_config)))
$(LOCAL_BUILT_MODULE): $(my_dexpreopt_config)
endif
ifdef LOCAL_SOONG_CLASSES_JAR