Merge "Tune R8 shrinking defaults for system_server" am: 08a46cda1b

Original change: https://android-review.googlesource.com/c/platform/build/+/2169486

Change-Id: I6095b857e17f2142dc99b7d90291b84ea1bbae4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-08-02 17:45:45 +00:00 committed by Automerger Merge Worker
commit 53d7adcba3

View file

@ -102,9 +102,22 @@ endif
# TODO(b/203088572): Remove when Java optimizations enabled by default for
# SystemUI.
$(call add_soong_config_var,ANDROID,SYSTEMUI_OPTIMIZE_JAVA)
# Enable by default unless explicitly set or overridden.
# See frameworks/base/services/Android.bp for additional notes on side effects.
SYSTEM_OPTIMIZE_JAVA ?= true
# Enable system_server optimizations by default unless explicitly set or if
# there may be dependent runtime jars.
# TODO(b/240588226): Remove the off-by-default exceptions after handling
# system_server jars automatically w/ R8.
ifeq (true,$(PRODUCT_BROKEN_SUBOPTIMAL_ORDER_OF_SYSTEM_SERVER_JARS))
# If system_server jar ordering is broken, don't assume services.jar can be
# safely optimized in isolation, as there may be dependent jars.
SYSTEM_OPTIMIZE_JAVA ?= false
else ifneq (platform:services,$(lastword $(PRODUCT_SYSTEM_SERVER_JARS)))
# If services is not the final jar in the dependency ordering, don't assume
# it can be safely optimized in isolation, as there may be dependent jars.
SYSTEM_OPTIMIZE_JAVA ?= false
else
SYSTEM_OPTIMIZE_JAVA ?= true
endif
$(call add_soong_config_var,ANDROID,SYSTEM_OPTIMIZE_JAVA)
# Check for SupplementalApi module.