From 62519def7bb2714e005097e93ff34353a7deed12 Mon Sep 17 00:00:00 2001 From: Jeongik Cha Date: Thu, 13 May 2021 13:29:39 +0900 Subject: [PATCH] Don't make dexpreopt_tools.zip when dex2oat isn't avilable Test: m Bug: 158843648 Change-Id: Iae90ea60fc73f1a6202499528277fce7c950d9d3 --- core/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index 8a51c1f495..26b19c0ec6 100644 --- a/core/Makefile +++ b/core/Makefile @@ -5321,6 +5321,7 @@ $(APPCOMPAT_ZIP): $(SOONG_ZIP) # The mac build doesn't build dex2oat, so create the zip file only if the build OS is linux. ifeq ($(BUILD_OS),linux) +ifneq ($(DEX2OAT),) dexpreopt_tools_deps := $(DEXPREOPT_GEN_DEPS) $(DEXPREOPT_GEN) $(AAPT2) DEXPREOPT_TOOLS_ZIP := $(PRODUCT_OUT)/dexpreopt_tools.zip $(DEXPREOPT_TOOLS_ZIP): $(dexpreopt_tools_deps) @@ -5328,7 +5329,8 @@ $(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 +endif # DEX2OAT is set +endif # BUILD_OS == linux DEXPREOPT_CONFIG_ZIP := $(PRODUCT_OUT)/dexpreopt_config.zip $(DEXPREOPT_CONFIG_ZIP): $(FULL_SYSTEMIMAGE_DEPS) \