Build: Amend minidebug odex setup
Add PRODUCT_OTHER_JAVA_DEBUG_INFO similar to PRODUCT_SYSTEM_SERVER_DEBUG_INFO. Use WITH_DEXPREOPT_DEBUG_INFO as global default, and allow the product to opt out by setting the above to "false." Bug: 75259124 Test: m Change-Id: Id4a2e5d00a1b73a7e7a0a65146042c0aa0c1b411
This commit is contained in:
parent
f3e39e5878
commit
c3e151954f
|
@ -279,19 +279,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
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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 := \
|
||||
|
|
Loading…
Reference in New Issue