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:
12
java/base.go
12
java/base.go
@@ -22,9 +22,9 @@ import (
|
||||
|
||||
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
"github.com/google/blueprint/pathtools"
|
||||
"github.com/google/blueprint/proptools"
|
||||
"github.com/google/blueprint"
|
||||
|
||||
"android/soong/aconfig"
|
||||
"android/soong/android"
|
||||
@@ -514,8 +514,8 @@ type Module struct {
|
||||
// or the module should override Stem().
|
||||
stem string
|
||||
|
||||
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||
transitiveAconfigFiles map[string]*android.DepSet[android.Path]
|
||||
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
func (j *Module) CheckStableSdkVersion(ctx android.BaseModuleContext) error {
|
||||
@@ -1721,7 +1721,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
|
||||
|
||||
ctx.CheckbuildFile(outputFile)
|
||||
|
||||
aconfig.CollectTransitiveAconfigFiles(ctx, &j.transitiveAconfigFiles)
|
||||
aconfig.CollectDependencyAconfigFiles(ctx, &j.mergedAconfigFiles)
|
||||
|
||||
ctx.SetProvider(JavaInfoProvider, JavaInfo{
|
||||
HeaderJars: android.PathsIfNonNil(j.headerJarFile),
|
||||
@@ -2078,10 +2078,6 @@ func (j *Module) IsInstallable() bool {
|
||||
return Bool(j.properties.Installable)
|
||||
}
|
||||
|
||||
func (j *Module) getTransitiveAconfigFiles(container string) []android.Path {
|
||||
return j.transitiveAconfigFiles[container].ToList()
|
||||
}
|
||||
|
||||
type sdkLinkType int
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user