From d788b3e6cb8753ea3460bd2cb462aff27a966aef Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 28 Nov 2023 13:14:56 -0800 Subject: Merge aconfig files per-module Passing the list of all transitive aconfig files to Make causes extra Kati analysis runs when dependencies are changed in Android.bp files. Since Make is going to merge them anyways, merge them per-module and pass a single aconfig file to Make for each module. Fixes: 313698230 Test: m out/target/product/vsoc_x86_64/system/etc/aconfig_flags.pb Change-Id: Ifde4826bc93bc06e40338f72b4cb39eed26ca08d --- java/androidmk.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'java/androidmk.go') diff --git a/java/androidmk.go b/java/androidmk.go index 4da40d246..a3f94cd8c 100644 --- a/java/androidmk.go +++ b/java/androidmk.go @@ -129,7 +129,8 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries { entries.SetPath("LOCAL_SOONG_DEXPREOPT_CONFIG", library.dexpreopter.configPath) } // TODO(b/311155208): The container here should be system. - entries.SetOptionalPaths("LOCAL_ACONFIG_FILES", library.getTransitiveAconfigFiles("")) + + entries.SetPaths("LOCAL_ACONFIG_FILES", library.mergedAconfigFiles[""]) }, }, }) @@ -307,7 +308,7 @@ func (binary *Binary) AndroidMkEntries() []android.AndroidMkEntries { entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", binary.dexpreopter.builtInstalled) } // TODO(b/311155208): The container here should be system. - entries.SetOptionalPaths("LOCAL_ACONFIG_FILES", binary.getTransitiveAconfigFiles("")) + entries.SetPaths("LOCAL_ACONFIG_FILES", binary.mergedAconfigFiles[""]) }, }, ExtraFooters: []android.AndroidMkExtraFootersFunc{ @@ -461,7 +462,7 @@ func (app *AndroidApp) AndroidMkEntries() []android.AndroidMkEntries { if app.Name() != "framework-res" { // TODO(b/311155208): The container here should be system. - entries.SetOptionalPaths("LOCAL_ACONFIG_FILES", app.getTransitiveAconfigFiles("")) + entries.SetPaths("LOCAL_ACONFIG_FILES", app.mergedAconfigFiles[""]) } }, }, @@ -540,7 +541,7 @@ func (a *AndroidLibrary) AndroidMkEntries() []android.AndroidMkEntries { entries.SetPath("LOCAL_SOONG_EXPORT_PROGUARD_FLAGS", a.combinedExportedProguardFlagsFile) entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true) // TODO(b/311155208): The container here should be system. - entries.SetOptionalPaths("LOCAL_ACONFIG_FILES", a.getTransitiveAconfigFiles("")) + entries.SetPaths("LOCAL_ACONFIG_FILES", a.mergedAconfigFiles[""]) }) return entriesList -- cgit v1.2.3-59-g8ed1b