From 74dc00b88f22df69659ffde13acb047ef7116858 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Wed, 27 Feb 2019 14:38:27 +0000 Subject: [PATCH] Move WITH_DEXPREOPT default value This allows setting the variable READONLY after reading the BoardConfig. This is safe to do because this flag is only set in BoardConfig.mk files. The same is not true for many of the other default preopt flags, like DEX_PREOPT_DEFAULT or WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY which are set in mixture of product / board config files. Test: boot blueline Change-Id: I961ba581f9790bcdc7cf6b36d8b53bcdb8861a92 --- core/board_config.mk | 5 +++++ core/dex_preopt_config.mk | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/board_config.mk b/core/board_config.mk index 1e0e9e197c..528c133a9c 100644 --- a/core/board_config.mk +++ b/core/board_config.mk @@ -19,6 +19,11 @@ # and sanity-checks the variable defined therein. # ############################################################### +# Conditional to building on linux, as dex2oat currently does not work on darwin. +ifeq ($(HOST_OS),linux) + WITH_DEXPREOPT := true +endif + # ############################################################### # Broken build defaults # ############################################################### diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk index 9bf2be866b..13e46347e7 100644 --- a/core/dex_preopt_config.mk +++ b/core/dex_preopt_config.mk @@ -20,7 +20,6 @@ ifeq ($(PRODUCT_DEX_PREOPT_NEVER_ALLOW_STRIPPING),) endif # Conditional to building on linux, as dex2oat currently does not work on darwin. ifeq ($(HOST_OS),linux) - WITH_DEXPREOPT ?= true ifeq (eng,$(TARGET_BUILD_VARIANT)) # Don't strip for quick development turnarounds. DEX_PREOPT_DEFAULT := nostripping