From f4bf5d5e62e2e2b45bea8fd9a0dfb5dbe6d04007 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Fri, 12 Feb 2021 21:20:40 +0000 Subject: [PATCH] Build the ART modules from source if they are listed in TARGET_BUILD_APPS. Test: Run build_mainline_modules.sh and check that SOONG_CONFIG_art_module_source_build is true even if the fallback default is false. Bug: 172480615 Change-Id: Ie0e9566d4d09b1e54af00c06021aa355adcf0a1a --- core/android_soong_config_vars.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk index ff33e0cced..cc369a3ad3 100644 --- a/core/android_soong_config_vars.mk +++ b/core/android_soong_config_vars.mk @@ -33,7 +33,10 @@ ifeq (,$(filter art_module,$(SOONG_CONFIG_NAMESPACES))) $(call add_soong_config_namespace,art_module) SOONG_CONFIG_art_module += source_build endif -ifneq (,$(filter true,$(NATIVE_COVERAGE) $(CLANG_COVERAGE))) +ifneq (,$(findstring .android.art,$(TARGET_BUILD_APPS))) + # Build ART modules from source if they are listed in TARGET_BUILD_APPS. + SOONG_CONFIG_art_module_source_build := true +else ifneq (,$(filter true,$(NATIVE_COVERAGE) $(CLANG_COVERAGE))) # Always build ART APEXes from source in coverage builds since the prebuilts # aren't built with instrumentation. # TODO(b/172480617): Find another solution for this.