From d2e54d236204442afb80d03d50a53ba2284bb175 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 6 Dec 2017 16:04:35 -0800 Subject: [PATCH 1/2] Fix dex_preopt with profile on a soong module The oreo merge to AOSP master added a new variable that must be set when dex preopting a java module with a profile. Test: m checkbuild Change-Id: Ib917761ea4fea481e32f3fb663a18b882a13f4a1 --- core/soong_java_prebuilt.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk index e7f5fa57f..406261d17 100644 --- a/core/soong_java_prebuilt.mk +++ b/core/soong_java_prebuilt.mk @@ -41,9 +41,13 @@ ifdef LOCAL_SOONG_DEX_JAR $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar))) $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_jar) $(full_classes_header_jar))) + dex_preopt_profile_src_file := $(common_javalib.jar) + # defines built_odex along with rule to install odex include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk + dex_preopt_profile_src_file := + ifdef LOCAL_DEX_PREOPT ifneq ($(dexpreopt_boot_jar_module),) # boot jar # boot jar's rules are defined in dex_preopt.mk From 8cd412feeea8c809fff719206e736acf841bae5d Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 6 Dec 2017 16:09:49 -0800 Subject: [PATCH 2/2] Add dependency on jacoco-report-classes.jar jacoco-report-classes.jar is found by a glob, so there is no explicit dependency on it. Add a dependency to javalib.jar so that it gets installed. Bug: 70295664 Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true WITH_DEXPREPOT=false Change-Id: Ia7feaa132879539f88c08a49148e4bbb5a141eab --- core/soong_java_prebuilt.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk index 406261d17..6cf94229c 100644 --- a/core/soong_java_prebuilt.mk +++ b/core/soong_java_prebuilt.mk @@ -26,6 +26,8 @@ $(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(full_classes_pre_pro 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 ifneq ($(TURBINE_DISABLED),false)