Merge "Enable stripping of java debug information when required." am: d659f806e5 am: 8c485b6b0c

am: a1847ffedf

Change-Id: I085608da575941de51eea8bc8deb7067a3673dd3
This commit is contained in:
Przemyslaw Szczepaniak 2017-07-07 15:56:22 +00:00 committed by android-build-merger
commit 07f315d91d
3 changed files with 15 additions and 0 deletions

View file

@ -429,6 +429,16 @@ ifeq ($(RUN_ERROR_PRONE),true)
LOCAL_JAVACFLAGS += $(LOCAL_ERROR_PRONE_FLAGS)
endif
# For user / userdebug builds, strip the local variable table and the local variable
# type table. This has no bearing on stack traces, but will leave less information
# available via JDWP.
ifneq (,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO))
ifneq (,$(filter userdebug user,$(TARGET_BUILD_VARIANT)))
LOCAL_JAVACFLAGS+= -g:source,lines
LOCAL_JACK_FLAGS+= -D jack.dex.debug.vars=false -D jack.dex.debug.vars.synthetic=false
endif
endif
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(GLOBAL_JAVAC_DEBUG_FLAGS) $(LOCAL_JAVACFLAGS) $(annotation_processor_flags)
$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES := $(LOCAL_JAR_EXCLUDE_FILES)
$(full_classes_compiled_jar): PRIVATE_JAR_PACKAGES := $(LOCAL_JAR_PACKAGES)

View file

@ -135,6 +135,7 @@ _product_var_list := \
PRODUCT_ART_USE_READ_BARRIER \
PRODUCT_IOT \
PRODUCT_SYSTEM_HEADROOM \
PRODUCT_MINIMIZE_JAVA_DEBUG_INFO \

View file

@ -430,3 +430,7 @@ PRODUCT_ENFORCE_RRO_TARGETS := \
# Add reserved headroom to a system image.
PRODUCT_SYSTEM_HEADROOM := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_HEADROOM))
# Whether to save disk space by minimizing java debug info
PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_MINIMIZE_JAVA_DEBUG_INFO))