From 6c6c51aa794e88c32389c24589ded0ab5e378d6a Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 10 Mar 2016 15:07:27 -0800 Subject: [PATCH 1/2] Revert "Don't preopt on eng builds." This reverts commit 7effde0048bcce6084e00bf29ff3bea4f34d1599. Bug: 25801231 Bug: 26794212 --- core/dex_preopt.mk | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk index de0b80a493..6499b638ef 100644 --- a/core/dex_preopt.mk +++ b/core/dex_preopt.mk @@ -21,13 +21,9 @@ DEX_PREOPT_DEFAULT ?= true # The default values for pre-opting: always preopt PIC. # Conditional to building on linux, as dex2oat currently does not work on darwin. -# Conditional to building a non-eng build, as it currently negatively affects -# some development workflows. -ifneq ($(TARGET_BUILD_VARIANT),eng) - ifeq ($(HOST_OS),linux) - WITH_DEXPREOPT_PIC ?= true - WITH_DEXPREOPT ?= true - endif +ifeq ($(HOST_OS),linux) + WITH_DEXPREOPT_PIC ?= true + WITH_DEXPREOPT ?= true endif # $(1): the .jar or .apk to remove classes.dex From 4df565786a5a8cbd841556241c7ecb0c9db286e6 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 10 Mar 2016 15:34:46 -0800 Subject: [PATCH 2/2] Build: Only preopt boot images in eng builds As a middle way between full preopt/high performance/long builds, and no preopt/low performance/fast turnaround, preopt only the boot image in eng builds. Bug: 26794212 Change-Id: I4a2692f3ce84823cd40c6b7d672fd73257739ef8 --- core/dex_preopt.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk index 6499b638ef..2941b73479 100644 --- a/core/dex_preopt.mk +++ b/core/dex_preopt.mk @@ -24,6 +24,11 @@ DEX_PREOPT_DEFAULT ?= true ifeq ($(HOST_OS),linux) WITH_DEXPREOPT_PIC ?= true WITH_DEXPREOPT ?= true +# For an eng build only pre-opt the boot image. This gives reasonable performance and still +# allows a simple workflow: building in frameworks/base and syncing. + ifeq (eng,$(TARGET_BUILD_VARIANT)) + WITH_DEXPREOPT_BOOT_IMG_ONLY ?= true + endif endif # $(1): the .jar or .apk to remove classes.dex