Merge "Build: Amend minidebug odex setup" into pi-dev

This commit is contained in:
TreeHugger Robot 2018-03-26 19:06:12 +00:00 committed by Android (Google) Code Review
commit 31524af62a
3 changed files with 33 additions and 10 deletions

View File

@ -285,19 +285,39 @@ $(my_built_dm): $(my_copied_vdex) $(ZIPTIME)
$(eval $(call copy-one-file,$(my_built_dm),$(my_installed_dm)))
endif
# PRODUCT_SYSTEM_SERVER_DEBUG_INFO overrides WITH_DEXPREOPT_DEBUG_INFO.
my_system_server_debug_info := $(PRODUCT_SYSTEM_SERVER_DEBUG_INFO)
ifeq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
# Only enable for non-eng builds.
ifeq (,$(my_system_server_debug_info))
my_system_server_debug_info := true
endif
# By default, emit debug info.
my_dexpreopt_debug_info := true
# If the global setting suppresses mini-debug-info, disable it.
ifeq (false,$(WITH_DEXPREOPT_DEBUG_INFO))
my_dexpreopt_debug_info := false
endif
ifeq (true, $(my_system_server_debug_info))
ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE)))
LOCAL_DEX_PREOPT_FLAGS += --generate-mini-debug-info
# PRODUCT_SYSTEM_SERVER_DEBUG_INFO overrides WITH_DEXPREOPT_DEBUG_INFO.
# PRODUCT_OTHER_JAVA_DEBUG_INFO overrides WITH_DEXPREOPT_DEBUG_INFO.
ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE)))
ifeq (true,$(PRODUCT_SYSTEM_SERVER_DEBUG_INFO))
my_dexpreopt_debug_info := true
else ifeq (false,$(PRODUCT_SYSTEM_SERVER_DEBUG_INFO))
my_dexpreopt_debug_info := false
endif
else
ifeq (true,$(PRODUCT_OTHER_JAVA_DEBUG_INFO))
my_dexpreopt_debug_info := true
else ifeq (false,$(PRODUCT_OTHER_JAVA_DEBUG_INFO))
my_dexpreopt_debug_info := false
endif
endif
# Never enable on eng.
ifeq (eng,$(filter eng, $(TARGET_BUILD_VARIANT)))
my_dexpreopt_debug_info := false
endif
# Add dex2oat flag for debug-info/no-debug-info.
ifeq (true,$(my_dexpreopt_debug_info))
LOCAL_DEX_PREOPT_FLAGS += --generate-mini-debug-info
else ifeq (false,$(my_dexpreopt_debug_info))
LOCAL_DEX_PREOPT_FLAGS += --no-generate-mini-debug-info
endif
# Set the compiler reason to 'prebuilt' to identify the oat files produced

View File

@ -128,6 +128,7 @@ _product_var_list := \
PRODUCT_VENDOR_VERITY_PARTITION \
PRODUCT_PRODUCT_VERITY_PARTITION \
PRODUCT_SYSTEM_SERVER_DEBUG_INFO \
PRODUCT_OTHER_JAVA_DEBUG_INFO \
PRODUCT_DEX_PREOPT_MODULE_CONFIGS \
PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER \
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \

View File

@ -413,6 +413,8 @@ PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_COMPILER_FILTER))
PRODUCT_SYSTEM_SERVER_DEBUG_INFO := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_DEBUG_INFO))
PRODUCT_OTHER_JAVA_DEBUG_INFO := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OTHER_JAVA_DEBUG_INFO))
# Resolve and setup per-module dex-preopt configs.
PRODUCT_DEX_PREOPT_MODULE_CONFIGS := \