Also disable dexpreopt for boot images for unbundled builds.
This fixes the tradefed build error caused by aosp/2582191.
Bug: 280440941
Test: `BUILD_BROKEN_DISABLE_BAZEL=true m dist` on tradefed branch.
Change-Id: I34c9fea0a5f7110c9b2bda1986df82afa3eafc79
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk
index e36e2eb..7b9c4db 100644
--- a/core/dex_preopt_config.mk
+++ b/core/dex_preopt_config.mk
@@ -12,9 +12,15 @@
# would result in passing bad arguments to dex2oat and failing the build.
ENABLE_PREOPT :=
ENABLE_PREOPT_BOOT_IMAGES :=
-else ifeq (true,$(DISABLE_PREOPT))
- # Disable dexpreopt for libraries/apps, but do compile boot images.
- ENABLE_PREOPT :=
+else
+ ifeq (true,$(DISABLE_PREOPT))
+ # Disable dexpreopt for libraries/apps, but may compile boot images.
+ ENABLE_PREOPT :=
+ endif
+ ifeq (true,$(DISABLE_PREOPT_BOOT_IMAGES))
+ # Disable dexpreopt for boot images, but may compile libraries/apps.
+ ENABLE_PREOPT_BOOT_IMAGES :=
+ endif
endif
# The default value for LOCAL_DEX_PREOPT