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
This commit is contained in:
@@ -134,7 +134,7 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
"$(SOONG_SDK_VARIANT_MODULES) $(patsubst %.sdk,%,$(LOCAL_MODULE))")
|
||||
}
|
||||
// TODO(b/311155208): The container here should be system.
|
||||
entries.SetOptionalPaths("LOCAL_ACONFIG_FILES", c.getTransitiveAconfigFiles(""))
|
||||
entries.SetPaths("LOCAL_ACONFIG_FILES", c.mergedAconfigFiles[""])
|
||||
},
|
||||
},
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
|
8
cc/cc.go
8
cc/cc.go
@@ -928,7 +928,7 @@ type Module struct {
|
||||
hideApexVariantFromMake bool
|
||||
|
||||
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||
transitiveAconfigFiles map[string]*android.DepSet[android.Path]
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
func (c *Module) AddJSONData(d *map[string]interface{}) {
|
||||
@@ -2324,7 +2324,7 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
|
||||
}
|
||||
ctx.SetProvider(blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: deps.GeneratedSources.Strings()})
|
||||
|
||||
aconfig.CollectTransitiveAconfigFiles(ctx, &c.transitiveAconfigFiles)
|
||||
aconfig.CollectDependencyAconfigFiles(ctx, &c.mergedAconfigFiles)
|
||||
|
||||
c.maybeInstall(ctx, apexInfo)
|
||||
}
|
||||
@@ -2345,10 +2345,6 @@ func (c *Module) maybeUnhideFromMake() {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Module) getTransitiveAconfigFiles(container string) []android.Path {
|
||||
return c.transitiveAconfigFiles[container].ToList()
|
||||
}
|
||||
|
||||
// maybeInstall is called at the end of both GenerateAndroidBuildActions and
|
||||
// ProcessBazelQueryResponse to run the install hooks for installable modules,
|
||||
// like binaries and tests.
|
||||
|
Reference in New Issue
Block a user