For user and userdebug generate error if DEXPREOPT is not enabled

This prevents cases where system_server is running in interpreter
only mode.

Removed unused flag in product.mk

(cherry-picked from commit 27f4287406)

Bug: 74209329
Test: WITH_DEXPREOPT=false make
Merged-In: I4ab3afed95a5baf77d0cd089dafaa18bcc1913e5
Change-Id: I4ab3afed95a5baf77d0cd089dafaa18bcc1913e5
This commit is contained in:
Mathieu Chartier 2018-03-06 13:09:01 -08:00
parent 0d6a25c73f
commit 2594230d83
2 changed files with 11 additions and 2 deletions

View File

@ -46,6 +46,16 @@ ifeq ($(HOST_OS),linux)
ifneq (false,$(WITH_DEXPREOPT_DEBUG_INFO))
PRODUCT_DEX_PREOPT_BOOT_FLAGS += --generate-mini-debug-info
endif
# Non eng linux builds must have preopt enabled so that system server doesn't run as interpreter
# only. b/74209329
ifeq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
ifneq (true,$(WITH_DEXPREOPT))
ifneq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY))
$(call pretty-error, DEXPREOPT must be enabled for user and userdebug builds)
endif
endif
endif
endif
GLOBAL_DEXPREOPT_FLAGS :=

View File

@ -317,8 +317,7 @@ _product_stash_var_list += \
_product_stash_var_list += \
DEFAULT_SYSTEM_DEV_CERTIFICATE \
WITH_DEXPREOPT \
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY \
WITH_DEXPREOPT_APP_IMAGE
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
#
# Mark the variables in _product_stash_var_list as readonly