diff --git a/core/Makefile b/core/Makefile index b70948bb3..8a51c1f49 100644 --- a/core/Makefile +++ b/core/Makefile @@ -5319,6 +5319,17 @@ $(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) +# The mac build doesn't build dex2oat, so create the zip file only if the build OS is linux. +ifeq ($(BUILD_OS),linux) +dexpreopt_tools_deps := $(DEXPREOPT_GEN_DEPS) $(DEXPREOPT_GEN) $(AAPT2) +DEXPREOPT_TOOLS_ZIP := $(PRODUCT_OUT)/dexpreopt_tools.zip +$(DEXPREOPT_TOOLS_ZIP): $(dexpreopt_tools_deps) +$(DEXPREOPT_TOOLS_ZIP): PRIVATE_DEXPREOPT_TOOLS_DEPS := $(dexpreopt_tools_deps) +$(DEXPREOPT_TOOLS_ZIP): $(SOONG_ZIP) + $(hide) mkdir -p $(dir $@) + $(hide) $(SOONG_ZIP) -d -o $@ -j $(addprefix -f ,$(PRIVATE_DEXPREOPT_TOOLS_DEPS)) -f $$(realpath $(DEX2OAT)) +endif + DEXPREOPT_CONFIG_ZIP := $(PRODUCT_OUT)/dexpreopt_config.zip $(DEXPREOPT_CONFIG_ZIP): $(FULL_SYSTEMIMAGE_DEPS) \ $(INTERNAL_RAMDISK_FILES) \ diff --git a/core/main.mk b/core/main.mk index c9fa14874..c45c1f250 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1709,6 +1709,7 @@ else ifeq (,$(TARGET_BUILD_UNBUNDLED)) $(COVERAGE_ZIP) \ $(APPCOMPAT_ZIP) \ $(DEXPREOPT_CONFIG_ZIP) \ + $(DEXPREOPT_TOOLS_ZIP) \ $(INSTALLED_FILES_FILE) \ $(INSTALLED_FILES_JSON) \ $(INSTALLED_FILES_FILE_VENDOR) \