From 20e06d25ac720f1bd84d4b5ff374ea645d41d8c3 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 2 Jan 2018 13:16:43 -0800 Subject: [PATCH 1/2] Fix dependency on Soong jacoco report classes The dependency on the Soong jacoco report classes was mistakenly using $(common_javalib.jar) which was never set, so was using the value from the last module. Use $(LOCAL_BUILT_MODULE) instead. Test: m checkbuild Change-Id: If502d67f9e5e0c107de44e96cbf232406c027e44 --- core/soong_app_prebuilt.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk index 633ef0c37..0059e51e8 100644 --- a/core/soong_app_prebuilt.mk +++ b/core/soong_app_prebuilt.mk @@ -13,13 +13,6 @@ LOCAL_BUILT_MODULE_STEM := package.apk include $(BUILD_SYSTEM)/base_rules.mk ####################################### -ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR - $(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\ - $(intermediates.COMMON)/jacoco-report-classes.jar)) - $(call add-dependency,$(common_javalib.jar),\ - $(intermediates.COMMON)/jacoco-report-classes.jar) -endif - full_classes_jar := $(intermediates.COMMON)/classes.jar full_classes_pre_proguard_jar := $(intermediates.COMMON)/classes-pre-proguard.jar full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar @@ -27,6 +20,13 @@ full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_jar))) $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_pre_proguard_jar))) +ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR + $(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\ + $(intermediates.COMMON)/jacoco-report-classes.jar)) + $(call add-dependency,$(LOCAL_BUILT_MODULE),\ + $(intermediates.COMMON)/jacoco-report-classes.jar) +endif + ifneq ($(TURBINE_DISABLED),false) ifdef LOCAL_SOONG_HEADER_JAR $(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar))) From 5e0986cb512ff9d23b99eb15a0806322b8931ef7 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 27 Dec 2017 19:46:02 -0800 Subject: [PATCH 2/2] Add R8 support to Soong. Move R8_COMPAT_PROGUARD definition to Soong. Copy the proguard_dictionary file so that the find command that builds proguard_dict.zip can find it. Test: m checkbuild Change-Id: I28b2fce26ccb6225be0bd71802a43fe63df85daa --- core/clear_vars.mk | 1 + core/config.mk | 2 -- core/soong_app_prebuilt.mk | 7 +++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/clear_vars.mk b/core/clear_vars.mk index e9c07dfa8..b4a03ea11 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -232,6 +232,7 @@ LOCAL_SOONG_CLASSES_JAR := LOCAL_SOONG_DEX_JAR := LOCAL_SOONG_HEADER_JAR := LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR := +LOCAL_SOONG_PROGUARD_DICT := LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE := LOCAL_SOONG_RRO_DIRS := # '',true diff --git a/core/config.mk b/core/config.mk index 4a0c540a9..3743c7cfb 100644 --- a/core/config.mk +++ b/core/config.mk @@ -581,8 +581,6 @@ else # TARGET_BUILD_APPS || TARGET_BUILD_PDK ZIPALIGN := $(prebuilt_build_tools_bin)/zipalign endif # TARGET_BUILD_APPS || TARGET_BUILD_PDK -R8_COMPAT_PROGUARD := $(HOST_OUT_EXECUTABLES)/r8-compat-proguard - ifeq (,$(TARGET_BUILD_APPS)) # Use RenderScript prebuilts for unbundled builds but not PDK builds LLVM_RS_CC := $(HOST_OUT_EXECUTABLES)/llvm-rs-cc diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk index 0059e51e8..65aabffa9 100644 --- a/core/soong_app_prebuilt.mk +++ b/core/soong_app_prebuilt.mk @@ -27,6 +27,13 @@ ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR $(intermediates.COMMON)/jacoco-report-classes.jar) endif +ifdef LOCAL_SOONG_PROGUARD_DICT + $(eval $(call copy-one-file,$(LOCAL_SOONG_PROGUARD_DICT),\ + $(intermediates.COMMON)/proguard_dictionary)) + $(call add-dependency,$(LOCAL_BUILT_MODULE),\ + $(intermediates.COMMON)/proguard_dictionary) +endif + ifneq ($(TURBINE_DISABLED),false) ifdef LOCAL_SOONG_HEADER_JAR $(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar)))