Added support for using R8 instead of Proguard + dx
With this change building with USE_R8=true will run R8 instead of Proguard + dx
for all targets that have LOCAL_PROGUARD_ENABLED set. R8 (through the
compatproguard wrapper) will use the same options as Proguard for now.
Additional Proguard configurations for R8 can be added using LOCAL_R8_FLAG_FILES
on individual targets. This makes it possible to make configuration updates
without touching the Proguard + dx configuration
Test: m -j
Test: m -j USE_D8=true USE_R8=true
Test: m -j USE_D8=true USE_R8=false
Test: m -j USE_D8=true
Change-Id: I78e8a0fd17cc5cefedccffe95b93c94a60a727f1
diff --git a/core/config.mk b/core/config.mk
index 61f7743..ed6c4aa 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -523,6 +523,7 @@
SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
SIGNAPK_JNI_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES)
ZIPALIGN := $(HOST_OUT_EXECUTABLES)/zipalign
+ R8 := $(HOST_OUT_EXECUTABLES)/r8
else # TARGET_BUILD_APPS || TARGET_BUILD_PDK
AIDL := $(prebuilt_sdk_tools_bin)/aidl
@@ -533,7 +534,7 @@
SIGNAPK_JAR := $(prebuilt_sdk_tools)/lib/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
SIGNAPK_JNI_LIBRARY_PATH := $(prebuilt_sdk_tools)/$(HOST_OS)/lib64
ZIPALIGN := $(prebuilt_sdk_tools_bin)/zipalign
-
+ R8 := $(prebuilt_build_tools_wrappers)/r8
endif # TARGET_BUILD_APPS || TARGET_BUILD_PDK
ifeq (,$(TARGET_BUILD_APPS))