Remove duplicated CollectDependencyAconfigFiles()
android.ModuleBase already calls aconfigUpdateAndroidBuildActions() that is the same with CollectDependencyAconfigFiles(). Remove the CollectDependencyAconfigFiles() to avoid duplication with aconfigUpdateAndroidBuildActions(). To make the aconfig information available in GenerateAndroidBuildActions() of all modules, call aconfigUpdateAndroidBuildActions() before calling GenerateAndroidBuildActions() of each module. Also, we don't need SetAconfigFileMkEntries(), which is a duplicate of aconfigUpdateAndroidMkData() Bug: 335363964 Test: diff `adb shell printflags` before and after the change. Change-Id: I52808e442e9fed7db1eae7b7c5ed0b1c5ba74f5d
This commit is contained in:
@@ -43,14 +43,6 @@ type AconfigDeclarationsProviderData struct {
|
||||
|
||||
var AconfigDeclarationsProviderKey = blueprint.NewProvider[AconfigDeclarationsProviderData]()
|
||||
|
||||
// This is used to collect the aconfig declarations info on the transitive closure,
|
||||
// the data is keyed on the container.
|
||||
type AconfigTransitiveDeclarationsInfo struct {
|
||||
AconfigFiles map[string]Paths
|
||||
}
|
||||
|
||||
var AconfigTransitiveDeclarationsInfoProvider = blueprint.NewProvider[AconfigTransitiveDeclarationsInfo]()
|
||||
|
||||
type ModeInfo struct {
|
||||
Container string
|
||||
Mode string
|
||||
@@ -80,54 +72,15 @@ func propagateModeInfos(ctx ModuleContext, module Module, to, from map[string]Mo
|
||||
}
|
||||
}
|
||||
|
||||
// CollectDependencyAconfigFiles is used by some module types to provide finer dependency graphing than
|
||||
// we can do in ModuleBase.
|
||||
func CollectDependencyAconfigFiles(ctx ModuleContext, mergedAconfigFiles *map[string]Paths) {
|
||||
if *mergedAconfigFiles == nil {
|
||||
*mergedAconfigFiles = make(map[string]Paths)
|
||||
}
|
||||
ctx.VisitDirectDepsIgnoreBlueprint(func(module Module) {
|
||||
if dep, _ := OtherModuleProvider(ctx, module, AconfigDeclarationsProviderKey); dep.IntermediateCacheOutputPath != nil {
|
||||
(*mergedAconfigFiles)[dep.Container] = append((*mergedAconfigFiles)[dep.Container], dep.IntermediateCacheOutputPath)
|
||||
return
|
||||
}
|
||||
if dep, ok := OtherModuleProvider(ctx, module, aconfigPropagatingProviderKey); ok {
|
||||
for container, v := range dep.AconfigFiles {
|
||||
(*mergedAconfigFiles)[container] = append((*mergedAconfigFiles)[container], v...)
|
||||
}
|
||||
}
|
||||
// We process these last, so that they determine the final value, eliminating any duplicates that we picked up
|
||||
// from UpdateAndroidBuildActions.
|
||||
if dep, ok := OtherModuleProvider(ctx, module, AconfigTransitiveDeclarationsInfoProvider); ok {
|
||||
for container, v := range dep.AconfigFiles {
|
||||
(*mergedAconfigFiles)[container] = append((*mergedAconfigFiles)[container], v...)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
for _, container := range SortedKeys(*mergedAconfigFiles) {
|
||||
aconfigFiles := (*mergedAconfigFiles)[container]
|
||||
(*mergedAconfigFiles)[container] = mergeAconfigFiles(ctx, container, aconfigFiles, false)
|
||||
}
|
||||
|
||||
SetProvider(ctx, AconfigTransitiveDeclarationsInfoProvider, AconfigTransitiveDeclarationsInfo{
|
||||
AconfigFiles: *mergedAconfigFiles,
|
||||
})
|
||||
}
|
||||
|
||||
func SetAconfigFileMkEntries(m *ModuleBase, entries *AndroidMkEntries, aconfigFiles map[string]Paths) {
|
||||
setAconfigFileMkEntries(m, entries, aconfigFiles)
|
||||
}
|
||||
|
||||
type aconfigPropagatingDeclarationsInfo struct {
|
||||
AconfigFiles map[string]Paths
|
||||
ModeInfos map[string]ModeInfo
|
||||
}
|
||||
|
||||
var aconfigPropagatingProviderKey = blueprint.NewProvider[aconfigPropagatingDeclarationsInfo]()
|
||||
var AconfigPropagatingProviderKey = blueprint.NewProvider[aconfigPropagatingDeclarationsInfo]()
|
||||
|
||||
func VerifyAconfigBuildMode(ctx ModuleContext, container string, module blueprint.Module, asError bool) {
|
||||
if dep, ok := OtherModuleProvider(ctx, module, aconfigPropagatingProviderKey); ok {
|
||||
if dep, ok := OtherModuleProvider(ctx, module, AconfigPropagatingProviderKey); ok {
|
||||
for k, v := range dep.ModeInfos {
|
||||
msg := fmt.Sprintf("%s/%s depends on %s/%s/%s across containers\n",
|
||||
module.Name(), container, k, v.Container, v.Mode)
|
||||
@@ -159,17 +112,12 @@ func aconfigUpdateAndroidBuildActions(ctx ModuleContext) {
|
||||
if dep, ok := OtherModuleProvider(ctx, module, AconfigDeclarationsProviderKey); ok {
|
||||
mergedAconfigFiles[dep.Container] = append(mergedAconfigFiles[dep.Container], dep.IntermediateCacheOutputPath)
|
||||
}
|
||||
if dep, ok := OtherModuleProvider(ctx, module, aconfigPropagatingProviderKey); ok {
|
||||
if dep, ok := OtherModuleProvider(ctx, module, AconfigPropagatingProviderKey); ok {
|
||||
for container, v := range dep.AconfigFiles {
|
||||
mergedAconfigFiles[container] = append(mergedAconfigFiles[container], v...)
|
||||
}
|
||||
propagateModeInfos(ctx, module, mergedModeInfos, dep.ModeInfos)
|
||||
}
|
||||
if dep, ok := OtherModuleProvider(ctx, module, AconfigTransitiveDeclarationsInfoProvider); ok {
|
||||
for container, v := range dep.AconfigFiles {
|
||||
mergedAconfigFiles[container] = append(mergedAconfigFiles[container], v...)
|
||||
}
|
||||
}
|
||||
})
|
||||
// We only need to set the provider if we have aconfig files.
|
||||
if len(mergedAconfigFiles) > 0 {
|
||||
@@ -178,7 +126,7 @@ func aconfigUpdateAndroidBuildActions(ctx ModuleContext) {
|
||||
mergedAconfigFiles[container] = mergeAconfigFiles(ctx, container, aconfigFiles, true)
|
||||
}
|
||||
|
||||
SetProvider(ctx, aconfigPropagatingProviderKey, aconfigPropagatingDeclarationsInfo{
|
||||
SetProvider(ctx, AconfigPropagatingProviderKey, aconfigPropagatingDeclarationsInfo{
|
||||
AconfigFiles: mergedAconfigFiles,
|
||||
ModeInfos: mergedModeInfos,
|
||||
})
|
||||
@@ -186,7 +134,7 @@ func aconfigUpdateAndroidBuildActions(ctx ModuleContext) {
|
||||
}
|
||||
|
||||
func aconfigUpdateAndroidMkData(ctx fillInEntriesContext, mod Module, data *AndroidMkData) {
|
||||
info, ok := SingletonModuleProvider(ctx, mod, aconfigPropagatingProviderKey)
|
||||
info, ok := SingletonModuleProvider(ctx, mod, AconfigPropagatingProviderKey)
|
||||
// If there is no aconfigPropagatingProvider, or there are no AconfigFiles, then we are done.
|
||||
if !ok || len(info.AconfigFiles) == 0 {
|
||||
return
|
||||
@@ -217,7 +165,7 @@ func aconfigUpdateAndroidMkEntries(ctx fillInEntriesContext, mod Module, entries
|
||||
if len(*entries) == 0 {
|
||||
return
|
||||
}
|
||||
info, ok := SingletonModuleProvider(ctx, mod, aconfigPropagatingProviderKey)
|
||||
info, ok := SingletonModuleProvider(ctx, mod, AconfigPropagatingProviderKey)
|
||||
if !ok || len(info.AconfigFiles) == 0 {
|
||||
return
|
||||
}
|
||||
@@ -225,7 +173,7 @@ func aconfigUpdateAndroidMkEntries(ctx fillInEntriesContext, mod Module, entries
|
||||
for idx, _ := range *entries {
|
||||
(*entries)[idx].ExtraEntries = append((*entries)[idx].ExtraEntries,
|
||||
func(ctx AndroidMkExtraEntriesContext, entries *AndroidMkEntries) {
|
||||
setAconfigFileMkEntries(mod.base(), entries, info.AconfigFiles)
|
||||
entries.AddPaths("LOCAL_ACONFIG_FILES", getAconfigFilePaths(mod.base(), info.AconfigFiles))
|
||||
},
|
||||
)
|
||||
|
||||
@@ -255,10 +203,6 @@ func mergeAconfigFiles(ctx ModuleContext, container string, inputs Paths, genera
|
||||
return Paths{output}
|
||||
}
|
||||
|
||||
func setAconfigFileMkEntries(m *ModuleBase, entries *AndroidMkEntries, aconfigFiles map[string]Paths) {
|
||||
entries.AddPaths("LOCAL_ACONFIG_FILES", getAconfigFilePaths(m, aconfigFiles))
|
||||
}
|
||||
|
||||
func getAconfigFilePaths(m *ModuleBase, aconfigFiles map[string]Paths) (paths Paths) {
|
||||
// TODO(b/311155208): The default container here should be system.
|
||||
container := "system"
|
||||
|
@@ -56,9 +56,6 @@ type fileGroup struct {
|
||||
DefaultableModuleBase
|
||||
properties fileGroupProperties
|
||||
srcs Paths
|
||||
|
||||
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||
mergedAconfigFiles map[string]Paths
|
||||
}
|
||||
|
||||
var _ SourceFileProducer = (*fileGroup)(nil)
|
||||
@@ -97,7 +94,6 @@ func (fg *fileGroup) GenerateAndroidBuildActions(ctx ModuleContext) {
|
||||
fg.srcs = PathsWithModuleSrcSubDir(ctx, fg.srcs, String(fg.properties.Path))
|
||||
}
|
||||
SetProvider(ctx, blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: fg.srcs.Strings()})
|
||||
CollectDependencyAconfigFiles(ctx, &fg.mergedAconfigFiles)
|
||||
|
||||
var aconfigDeclarations []string
|
||||
var intermediateCacheOutputPaths Paths
|
||||
|
@@ -1892,12 +1892,14 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
|
||||
}
|
||||
}
|
||||
|
||||
m.module.GenerateAndroidBuildActions(ctx)
|
||||
// Call aconfigUpdateAndroidBuildActions to collect merged aconfig files before being used
|
||||
// in m.module.GenerateAndroidBuildActions
|
||||
aconfigUpdateAndroidBuildActions(ctx)
|
||||
if ctx.Failed() {
|
||||
return
|
||||
}
|
||||
|
||||
aconfigUpdateAndroidBuildActions(ctx)
|
||||
m.module.GenerateAndroidBuildActions(ctx)
|
||||
if ctx.Failed() {
|
||||
return
|
||||
}
|
||||
|
13
apex/apex.go
13
apex/apex.go
@@ -490,9 +490,6 @@ type apexBundle struct {
|
||||
javaApisUsedByModuleFile android.ModuleOutPath
|
||||
|
||||
aconfigFiles []android.Path
|
||||
|
||||
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
// apexFileClass represents a type of file that can be included in APEX.
|
||||
@@ -2326,7 +2323,7 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext,
|
||||
}
|
||||
|
||||
func addAconfigFiles(vctx *visitorContext, ctx android.ModuleContext, module blueprint.Module) {
|
||||
if dep, ok := android.OtherModuleProvider(ctx, module, android.AconfigTransitiveDeclarationsInfoProvider); ok {
|
||||
if dep, ok := android.OtherModuleProvider(ctx, module, android.AconfigPropagatingProviderKey); ok {
|
||||
if len(dep.AconfigFiles) > 0 && dep.AconfigFiles[ctx.ModuleName()] != nil {
|
||||
vctx.aconfigFiles = append(vctx.aconfigFiles, dep.AconfigFiles[ctx.ModuleName()]...)
|
||||
}
|
||||
@@ -2414,7 +2411,6 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
return
|
||||
}
|
||||
}
|
||||
android.CollectDependencyAconfigFiles(ctx, &a.mergedAconfigFiles)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 3) some fields in apexBundle struct are configured
|
||||
@@ -2586,9 +2582,6 @@ func BundleFactory() android.Module {
|
||||
type Defaults struct {
|
||||
android.ModuleBase
|
||||
android.DefaultsModuleBase
|
||||
|
||||
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
// apex_defaults provides defaultable properties to other apex modules.
|
||||
@@ -2611,10 +2604,6 @@ type OverrideApex struct {
|
||||
android.OverrideModuleBase
|
||||
}
|
||||
|
||||
func (d *Defaults) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
android.CollectDependencyAconfigFiles(ctx, &d.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
func (o *OverrideApex) GenerateAndroidBuildActions(_ android.ModuleContext) {
|
||||
// All the overrides happen in the base module.
|
||||
}
|
||||
|
@@ -503,9 +503,6 @@ type Prebuilt struct {
|
||||
inputApex android.Path
|
||||
|
||||
provenanceMetaDataFile android.OutputPath
|
||||
|
||||
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
type ApexFileProperties struct {
|
||||
@@ -881,8 +878,6 @@ func (p *Prebuilt) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
p.installedFile = ctx.InstallFile(p.installDir, p.installFilename, p.inputApex, p.compatSymlinks...)
|
||||
p.provenanceMetaDataFile = provenance.GenerateArtifactProvenanceMetaData(ctx, p.inputApex, p.installedFile)
|
||||
}
|
||||
|
||||
android.CollectDependencyAconfigFiles(ctx, &p.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
func (p *Prebuilt) ProvenanceMetaDataFile() android.OutputPath {
|
||||
|
@@ -125,8 +125,6 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
entries.SetString("SOONG_SDK_VARIANT_MODULES",
|
||||
"$(SOONG_SDK_VARIANT_MODULES) $(patsubst %.sdk,%,$(LOCAL_MODULE))")
|
||||
}
|
||||
android.SetAconfigFileMkEntries(c.AndroidModuleBase(), entries, c.mergedAconfigFiles)
|
||||
|
||||
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", c.IsSkipInstall())
|
||||
},
|
||||
},
|
||||
|
12
cc/cc.go
12
cc/cc.go
@@ -913,9 +913,6 @@ type Module struct {
|
||||
|
||||
hideApexVariantFromMake bool
|
||||
|
||||
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
|
||||
logtagsPaths android.Paths
|
||||
}
|
||||
|
||||
@@ -1999,10 +1996,6 @@ func (c *Module) stubLibraryMultipleApexViolation(ctx android.ModuleContext) boo
|
||||
return false
|
||||
}
|
||||
|
||||
func (d *Defaults) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
android.CollectDependencyAconfigFiles(ctx, &d.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
|
||||
ctx := moduleContextFromAndroidModuleContext(actx, c)
|
||||
|
||||
@@ -2173,8 +2166,6 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
|
||||
android.SetProvider(ctx, cmakeSnapshotSourcesProvider, android.GlobFiles(ctx, ctx.ModuleDir()+"/**/*", nil))
|
||||
}
|
||||
|
||||
android.CollectDependencyAconfigFiles(ctx, &c.mergedAconfigFiles)
|
||||
|
||||
c.maybeInstall(ctx, apexInfo)
|
||||
|
||||
if c.linker != nil {
|
||||
@@ -4073,9 +4064,6 @@ type Defaults struct {
|
||||
android.ModuleBase
|
||||
android.DefaultsModuleBase
|
||||
android.ApexModuleBase
|
||||
|
||||
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
// cc_defaults provides a set of properties that can be inherited by other cc
|
||||
|
@@ -158,9 +158,6 @@ type PrebuiltEtc struct {
|
||||
additionalDependencies *android.Paths
|
||||
|
||||
makeClass string
|
||||
|
||||
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
type Defaults struct {
|
||||
@@ -421,7 +418,6 @@ func (p *PrebuiltEtc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
for _, ip := range installs {
|
||||
ip.addInstallRules(ctx)
|
||||
}
|
||||
android.CollectDependencyAconfigFiles(ctx, &p.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
type installProperties struct {
|
||||
@@ -486,7 +482,6 @@ func (p *PrebuiltEtc) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
if p.additionalDependencies != nil {
|
||||
entries.AddStrings("LOCAL_ADDITIONAL_DEPENDENCIES", p.additionalDependencies.Strings()...)
|
||||
}
|
||||
android.SetAconfigFileMkEntries(p.AndroidModuleBase(), entries, p.mergedAconfigFiles)
|
||||
},
|
||||
},
|
||||
}}
|
||||
|
@@ -180,9 +180,6 @@ type Module struct {
|
||||
|
||||
subName string
|
||||
subDir string
|
||||
|
||||
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
type taskFunc func(ctx android.ModuleContext, rawCommand string, srcFiles android.Paths) []generateTask
|
||||
@@ -588,24 +585,6 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
})
|
||||
g.outputDeps = android.Paths{phonyFile}
|
||||
}
|
||||
android.CollectDependencyAconfigFiles(ctx, &g.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
func (g *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
ret := android.AndroidMkEntries{
|
||||
OutputFile: android.OptionalPathForPath(g.outputFiles[0]),
|
||||
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
|
||||
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
||||
android.SetAconfigFileMkEntries(g.AndroidModuleBase(), entries, g.mergedAconfigFiles)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return []android.AndroidMkEntries{ret}
|
||||
}
|
||||
|
||||
func (g *Module) AndroidModuleBase() *android.ModuleBase {
|
||||
return &g.ModuleBase
|
||||
}
|
||||
|
||||
// Collect information for opening IDE project files in java/jdeps.go.
|
||||
|
@@ -1014,9 +1014,6 @@ type AARImport struct {
|
||||
|
||||
usesLibrary
|
||||
classLoaderContexts dexpreopt.ClassLoaderContextMap
|
||||
|
||||
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
var _ android.OutputFileProducer = (*AARImport)(nil)
|
||||
@@ -1386,7 +1383,6 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
android.SetProvider(ctx, JniPackageProvider, JniPackageInfo{
|
||||
JniPackages: a.jniPackages,
|
||||
})
|
||||
android.CollectDependencyAconfigFiles(ctx, &a.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
func (a *AARImport) HeaderJars() android.Paths {
|
||||
|
@@ -124,7 +124,6 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
if library.dexpreopter.configPath != nil {
|
||||
entries.SetPath("LOCAL_SOONG_DEXPREOPT_CONFIG", library.dexpreopter.configPath)
|
||||
}
|
||||
android.SetAconfigFileMkEntries(&library.ModuleBase, entries, library.mergedAconfigFiles)
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -298,7 +297,6 @@ func (binary *Binary) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
if len(binary.dexpreopter.builtInstalled) > 0 {
|
||||
entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", binary.dexpreopter.builtInstalled)
|
||||
}
|
||||
android.SetAconfigFileMkEntries(&binary.ModuleBase, entries, binary.mergedAconfigFiles)
|
||||
},
|
||||
},
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
@@ -450,10 +448,6 @@ func (app *AndroidApp) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
|
||||
entries.SetOptionalPaths("LOCAL_SOONG_LINT_REPORTS", app.linter.reports)
|
||||
|
||||
if app.Name() != "framework-res" {
|
||||
android.SetAconfigFileMkEntries(&app.ModuleBase, entries, app.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
entries.AddStrings("LOCAL_SOONG_LOGTAGS_FILES", app.logtagsSrcs.Strings()...)
|
||||
},
|
||||
},
|
||||
@@ -531,7 +525,6 @@ func (a *AndroidLibrary) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
entries.SetPath("LOCAL_FULL_MANIFEST_FILE", a.mergedManifestFile)
|
||||
entries.SetPath("LOCAL_SOONG_EXPORT_PROGUARD_FLAGS", a.combinedExportedProguardFlagsFile)
|
||||
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true)
|
||||
android.SetAconfigFileMkEntries(&a.ModuleBase, entries, a.mergedAconfigFiles)
|
||||
})
|
||||
|
||||
return entriesList
|
||||
|
@@ -87,9 +87,6 @@ type AndroidAppImport struct {
|
||||
hideApexVariantFromMake bool
|
||||
|
||||
provenanceMetaDataFile android.OutputPath
|
||||
|
||||
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
type AndroidAppImportProperties struct {
|
||||
@@ -416,7 +413,6 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext
|
||||
artifactPath := android.PathForModuleSrc(ctx, *a.properties.Apk)
|
||||
a.provenanceMetaDataFile = provenance.GenerateArtifactProvenanceMetaData(ctx, artifactPath, a.installPath)
|
||||
}
|
||||
android.CollectDependencyAconfigFiles(ctx, &a.mergedAconfigFiles)
|
||||
|
||||
providePrebuiltInfo(ctx,
|
||||
prebuiltInfoProps{
|
||||
|
@@ -537,9 +537,6 @@ type Module struct {
|
||||
// or the module should override Stem().
|
||||
stem string
|
||||
|
||||
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
|
||||
// Values that will be set in the JarJarProvider data for jarjar repackaging,
|
||||
// and merged with our dependencies' rules.
|
||||
jarjarRenameRules map[string]string
|
||||
@@ -1734,8 +1731,6 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
|
||||
|
||||
ctx.CheckbuildFile(outputFile)
|
||||
|
||||
android.CollectDependencyAconfigFiles(ctx, &j.mergedAconfigFiles)
|
||||
|
||||
android.SetProvider(ctx, JavaInfoProvider, JavaInfo{
|
||||
HeaderJars: android.PathsIfNonNil(j.headerJarFile),
|
||||
RepackagedHeaderJars: android.PathsIfNonNil(j.repackagedHeaderJarFile),
|
||||
|
@@ -106,9 +106,6 @@ type Droidstubs struct {
|
||||
everythingArtifacts stubsArtifacts
|
||||
exportableArtifacts stubsArtifacts
|
||||
|
||||
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
|
||||
exportableApiFile android.WritablePath
|
||||
exportableRemovedApiFile android.WritablePath
|
||||
}
|
||||
@@ -1342,7 +1339,6 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
|
||||
rule.Build("nullabilityWarningsCheck", "nullability warnings check")
|
||||
}
|
||||
android.CollectDependencyAconfigFiles(ctx, &d.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
func (d *Droidstubs) createApiContribution(ctx android.DefaultableHookContext) {
|
||||
|
@@ -71,9 +71,6 @@ type PythonBinaryModule struct {
|
||||
installedDest android.Path
|
||||
|
||||
androidMkSharedLibs []string
|
||||
|
||||
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
var _ android.AndroidMkEntriesProvider = (*PythonBinaryModule)(nil)
|
||||
@@ -106,7 +103,6 @@ func (p *PythonBinaryModule) GenerateAndroidBuildActions(ctx android.ModuleConte
|
||||
p.buildBinary(ctx)
|
||||
p.installedDest = ctx.InstallFile(installDir(ctx, "bin", "", ""),
|
||||
p.installSource.Base(), p.installSource)
|
||||
android.CollectDependencyAconfigFiles(ctx, &p.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
func (p *PythonBinaryModule) buildBinary(ctx android.ModuleContext) {
|
||||
@@ -170,7 +166,6 @@ func (p *PythonBinaryModule) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
entries.SetString("LOCAL_MODULE_STEM", stem)
|
||||
entries.AddStrings("LOCAL_SHARED_LIBRARIES", p.androidMkSharedLibs...)
|
||||
entries.SetBool("LOCAL_CHECK_ELF_FILES", false)
|
||||
android.SetAconfigFileMkEntries(&p.ModuleBase, entries, p.mergedAconfigFiles)
|
||||
})
|
||||
|
||||
return []android.AndroidMkEntries{entries}
|
||||
|
@@ -18,6 +18,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"android/soong/testing"
|
||||
|
||||
"github.com/google/blueprint/proptools"
|
||||
|
||||
"android/soong/android"
|
||||
@@ -151,7 +152,6 @@ func (p *PythonTestModule) GenerateAndroidBuildActions(ctx android.ModuleContext
|
||||
// just use buildBinary() so that the binary is not installed into the location
|
||||
// it would be for regular binaries.
|
||||
p.PythonLibraryModule.GenerateAndroidBuildActions(ctx)
|
||||
android.CollectDependencyAconfigFiles(ctx, &p.mergedAconfigFiles)
|
||||
p.buildBinary(ctx)
|
||||
|
||||
var configs []tradefed.Option
|
||||
@@ -227,7 +227,6 @@ func (p *PythonTestModule) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
}
|
||||
|
||||
entries.SetBoolIfTrue("LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG", !BoolDefault(p.binaryProperties.Auto_gen_config, true))
|
||||
android.SetAconfigFileMkEntries(&p.ModuleBase, entries, p.mergedAconfigFiles)
|
||||
|
||||
p.testProperties.Test_options.SetAndroidMkEntries(entries)
|
||||
})
|
||||
|
@@ -69,7 +69,6 @@ func (mod *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
} else if mod.InProduct() {
|
||||
entries.SetBool("LOCAL_IN_PRODUCT", true)
|
||||
}
|
||||
android.SetAconfigFileMkEntries(mod.AndroidModuleBase(), entries, mod.mergedAconfigFiles)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@@ -172,9 +172,6 @@ type Module struct {
|
||||
apexSdkVersion android.ApiLevel
|
||||
|
||||
transitiveAndroidMkSharedLibs *android.DepSet[string]
|
||||
|
||||
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||
mergedAconfigFiles map[string]android.Paths
|
||||
}
|
||||
|
||||
func (mod *Module) Header() bool {
|
||||
@@ -998,8 +995,6 @@ func (mod *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
|
||||
if mod.testModule {
|
||||
android.SetProvider(ctx, testing.TestModuleProviderKey, testing.TestModuleProviderData{})
|
||||
}
|
||||
|
||||
android.CollectDependencyAconfigFiles(ctx, &mod.mergedAconfigFiles)
|
||||
}
|
||||
|
||||
func (mod *Module) deps(ctx DepsContext) Deps {
|
||||
|
Reference in New Issue
Block a user