Merge aconfig files per-module am: d788b3e6cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2860765 Change-Id: Ie43ca8826156ff580618cdeda0337db270a82e62 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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
|
||||
|
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