Merge changes Iaf6d45a4,Ic56e8ef3,I11f0a0b5 into main
* changes: Propagate aconfig providers for more modules. move SetAconfigFileMkEntries to android aconfig: harden dependency collection
This commit is contained in:
@@ -164,18 +164,3 @@ func (module *DeclarationsModule) GenerateAndroidBuildActions(ctx android.Module
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetAconfigFileMkEntries(m *android.ModuleBase, entries *android.AndroidMkEntries, aconfigFiles map[string]android.Paths) {
|
|
||||||
// TODO(b/311155208): The default container here should be system.
|
|
||||||
container := ""
|
|
||||||
|
|
||||||
if m.SocSpecific() {
|
|
||||||
container = "vendor"
|
|
||||||
} else if m.ProductSpecific() {
|
|
||||||
container = "product"
|
|
||||||
} else if m.SystemExtSpecific() {
|
|
||||||
container = "system_ext"
|
|
||||||
}
|
|
||||||
|
|
||||||
entries.SetPaths("LOCAL_ACONFIG_FILES", aconfigFiles[container])
|
|
||||||
}
|
|
||||||
|
@@ -49,7 +49,13 @@ func CollectDependencyAconfigFiles(ctx ModuleContext, mergedAconfigFiles *map[st
|
|||||||
if *mergedAconfigFiles == nil {
|
if *mergedAconfigFiles == nil {
|
||||||
*mergedAconfigFiles = make(map[string]Paths)
|
*mergedAconfigFiles = make(map[string]Paths)
|
||||||
}
|
}
|
||||||
ctx.VisitDirectDeps(func(module Module) {
|
ctx.VisitDirectDepsBlueprint(func(module blueprint.Module) {
|
||||||
|
// Walk our direct dependencies, ignoring blueprint Modules and disabled Android Modules.
|
||||||
|
aModule, _ := module.(Module)
|
||||||
|
if aModule == nil || !aModule.Enabled() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if dep, _ := OtherModuleProvider(ctx, module, AconfigDeclarationsProviderKey); dep.IntermediateCacheOutputPath != nil {
|
if dep, _ := OtherModuleProvider(ctx, module, AconfigDeclarationsProviderKey); dep.IntermediateCacheOutputPath != nil {
|
||||||
(*mergedAconfigFiles)[dep.Container] = append((*mergedAconfigFiles)[dep.Container], dep.IntermediateCacheOutputPath)
|
(*mergedAconfigFiles)[dep.Container] = append((*mergedAconfigFiles)[dep.Container], dep.IntermediateCacheOutputPath)
|
||||||
return
|
return
|
||||||
@@ -90,3 +96,18 @@ func mergeAconfigFiles(ctx ModuleContext, inputs Paths) Paths {
|
|||||||
|
|
||||||
return Paths{output}
|
return Paths{output}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SetAconfigFileMkEntries(m *ModuleBase, entries *AndroidMkEntries, aconfigFiles map[string]Paths) {
|
||||||
|
// TODO(b/311155208): The default container here should be system.
|
||||||
|
container := ""
|
||||||
|
|
||||||
|
if m.SocSpecific() {
|
||||||
|
container = "vendor"
|
||||||
|
} else if m.ProductSpecific() {
|
||||||
|
container = "product"
|
||||||
|
} else if m.SystemExtSpecific() {
|
||||||
|
container = "system_ext"
|
||||||
|
}
|
||||||
|
|
||||||
|
entries.SetPaths("LOCAL_ACONFIG_FILES", aconfigFiles[container])
|
||||||
|
}
|
||||||
|
@@ -55,6 +55,9 @@ type fileGroup struct {
|
|||||||
DefaultableModuleBase
|
DefaultableModuleBase
|
||||||
properties fileGroupProperties
|
properties fileGroupProperties
|
||||||
srcs Paths
|
srcs Paths
|
||||||
|
|
||||||
|
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||||
|
mergedAconfigFiles map[string]Paths
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ SourceFileProducer = (*fileGroup)(nil)
|
var _ SourceFileProducer = (*fileGroup)(nil)
|
||||||
@@ -93,6 +96,7 @@ func (fg *fileGroup) GenerateAndroidBuildActions(ctx ModuleContext) {
|
|||||||
fg.srcs = PathsWithModuleSrcSubDir(ctx, fg.srcs, String(fg.properties.Path))
|
fg.srcs = PathsWithModuleSrcSubDir(ctx, fg.srcs, String(fg.properties.Path))
|
||||||
}
|
}
|
||||||
SetProvider(ctx, blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: fg.srcs.Strings()})
|
SetProvider(ctx, blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: fg.srcs.Strings()})
|
||||||
|
CollectDependencyAconfigFiles(ctx, &fg.mergedAconfigFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fg *fileGroup) Srcs() Paths {
|
func (fg *fileGroup) Srcs() Paths {
|
||||||
|
11
apex/apex.go
11
apex/apex.go
@@ -480,6 +480,9 @@ type apexBundle struct {
|
|||||||
javaApisUsedByModuleFile android.ModuleOutPath
|
javaApisUsedByModuleFile android.ModuleOutPath
|
||||||
|
|
||||||
aconfigFiles []android.Path
|
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.
|
// apexFileClass represents a type of file that can be included in APEX.
|
||||||
@@ -2356,6 +2359,7 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &a.mergedAconfigFiles)
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// 3) some fields in apexBundle struct are configured
|
// 3) some fields in apexBundle struct are configured
|
||||||
@@ -2515,6 +2519,9 @@ func BundleFactory() android.Module {
|
|||||||
type Defaults struct {
|
type Defaults struct {
|
||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.DefaultsModuleBase
|
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.
|
// apex_defaults provides defaultable properties to other apex modules.
|
||||||
@@ -2537,6 +2544,10 @@ type OverrideApex struct {
|
|||||||
android.OverrideModuleBase
|
android.OverrideModuleBase
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (d *Defaults) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &d.mergedAconfigFiles)
|
||||||
|
}
|
||||||
|
|
||||||
func (o *OverrideApex) GenerateAndroidBuildActions(_ android.ModuleContext) {
|
func (o *OverrideApex) GenerateAndroidBuildActions(_ android.ModuleContext) {
|
||||||
// All the overrides happen in the base module.
|
// All the overrides happen in the base module.
|
||||||
}
|
}
|
||||||
|
@@ -483,6 +483,9 @@ type Prebuilt struct {
|
|||||||
inputApex android.Path
|
inputApex android.Path
|
||||||
|
|
||||||
provenanceMetaDataFile android.OutputPath
|
provenanceMetaDataFile android.OutputPath
|
||||||
|
|
||||||
|
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||||
|
mergedAconfigFiles map[string]android.Paths
|
||||||
}
|
}
|
||||||
|
|
||||||
type ApexFileProperties struct {
|
type ApexFileProperties struct {
|
||||||
@@ -837,6 +840,8 @@ func (p *Prebuilt) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
p.installedFile = ctx.InstallFile(p.installDir, p.installFilename, p.inputApex, p.compatSymlinks...)
|
p.installedFile = ctx.InstallFile(p.installDir, p.installFilename, p.inputApex, p.compatSymlinks...)
|
||||||
p.provenanceMetaDataFile = provenance.GenerateArtifactProvenanceMetaData(ctx, p.inputApex, p.installedFile)
|
p.provenanceMetaDataFile = provenance.GenerateArtifactProvenanceMetaData(ctx, p.inputApex, p.installedFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &p.mergedAconfigFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Prebuilt) ProvenanceMetaDataFile() android.OutputPath {
|
func (p *Prebuilt) ProvenanceMetaDataFile() android.OutputPath {
|
||||||
|
@@ -15,8 +15,6 @@
|
|||||||
package cc
|
package cc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"android/soong/aconfig"
|
|
||||||
|
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -127,7 +125,7 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
entries.SetString("SOONG_SDK_VARIANT_MODULES",
|
entries.SetString("SOONG_SDK_VARIANT_MODULES",
|
||||||
"$(SOONG_SDK_VARIANT_MODULES) $(patsubst %.sdk,%,$(LOCAL_MODULE))")
|
"$(SOONG_SDK_VARIANT_MODULES) $(patsubst %.sdk,%,$(LOCAL_MODULE))")
|
||||||
}
|
}
|
||||||
aconfig.SetAconfigFileMkEntries(c.AndroidModuleBase(), entries, c.mergedAconfigFiles)
|
android.SetAconfigFileMkEntries(c.AndroidModuleBase(), entries, c.mergedAconfigFiles)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||||
|
7
cc/cc.go
7
cc/cc.go
@@ -1994,6 +1994,10 @@ func (c *Module) stubLibraryMultipleApexViolation(ctx android.ModuleContext) boo
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (d *Defaults) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &d.mergedAconfigFiles)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
|
func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
|
||||||
// Handle the case of a test module split by `test_per_src` mutator.
|
// Handle the case of a test module split by `test_per_src` mutator.
|
||||||
//
|
//
|
||||||
@@ -4075,6 +4079,9 @@ type Defaults struct {
|
|||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.DefaultsModuleBase
|
android.DefaultsModuleBase
|
||||||
android.ApexModuleBase
|
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
|
// cc_defaults provides a set of properties that can be inherited by other cc
|
||||||
|
@@ -155,6 +155,9 @@ type PrebuiltEtc struct {
|
|||||||
additionalDependencies *android.Paths
|
additionalDependencies *android.Paths
|
||||||
|
|
||||||
makeClass string
|
makeClass string
|
||||||
|
|
||||||
|
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||||
|
mergedAconfigFiles map[string]android.Paths
|
||||||
}
|
}
|
||||||
|
|
||||||
type Defaults struct {
|
type Defaults struct {
|
||||||
@@ -365,6 +368,7 @@ func (p *PrebuiltEtc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
symlinks: p.properties.Symlinks,
|
symlinks: p.properties.Symlinks,
|
||||||
}
|
}
|
||||||
p.addInstallRules(ctx, ip)
|
p.addInstallRules(ctx, ip)
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &p.mergedAconfigFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
type installProperties struct {
|
type installProperties struct {
|
||||||
@@ -433,11 +437,16 @@ func (p *PrebuiltEtc) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
if p.additionalDependencies != nil {
|
if p.additionalDependencies != nil {
|
||||||
entries.AddStrings("LOCAL_ADDITIONAL_DEPENDENCIES", p.additionalDependencies.Strings()...)
|
entries.AddStrings("LOCAL_ADDITIONAL_DEPENDENCIES", p.additionalDependencies.Strings()...)
|
||||||
}
|
}
|
||||||
|
android.SetAconfigFileMkEntries(p.AndroidModuleBase(), entries, p.mergedAconfigFiles)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *PrebuiltEtc) AndroidModuleBase() *android.ModuleBase {
|
||||||
|
return &p.ModuleBase
|
||||||
|
}
|
||||||
|
|
||||||
func InitPrebuiltEtcModule(p *PrebuiltEtc, dirBase string) {
|
func InitPrebuiltEtcModule(p *PrebuiltEtc, dirBase string) {
|
||||||
p.installDirBase = dirBase
|
p.installDirBase = dirBase
|
||||||
p.AddProperties(&p.properties)
|
p.AddProperties(&p.properties)
|
||||||
|
@@ -184,6 +184,9 @@ type Module struct {
|
|||||||
|
|
||||||
subName string
|
subName string
|
||||||
subDir 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
|
type taskFunc func(ctx android.ModuleContext, rawCommand string, srcFiles android.Paths) []generateTask
|
||||||
@@ -610,6 +613,24 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
})
|
})
|
||||||
g.outputDeps = android.Paths{phonyFile}
|
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.
|
// Collect information for opening IDE project files in java/jdeps.go.
|
||||||
|
@@ -980,6 +980,9 @@ type AARImport struct {
|
|||||||
|
|
||||||
sdkVersion android.SdkSpec
|
sdkVersion android.SdkSpec
|
||||||
minSdkVersion android.ApiLevel
|
minSdkVersion android.ApiLevel
|
||||||
|
|
||||||
|
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||||
|
mergedAconfigFiles map[string]android.Paths
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ android.OutputFileProducer = (*AARImport)(nil)
|
var _ android.OutputFileProducer = (*AARImport)(nil)
|
||||||
@@ -1274,6 +1277,7 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
android.SetProvider(ctx, JniPackageProvider, JniPackageInfo{
|
android.SetProvider(ctx, JniPackageProvider, JniPackageInfo{
|
||||||
JniPackages: a.jniPackages,
|
JniPackages: a.jniPackages,
|
||||||
})
|
})
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &a.mergedAconfigFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AARImport) HeaderJars() android.Paths {
|
func (a *AARImport) HeaderJars() android.Paths {
|
||||||
|
@@ -19,7 +19,6 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"android/soong/aconfig"
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
|
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
@@ -129,7 +128,7 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
if library.dexpreopter.configPath != nil {
|
if library.dexpreopter.configPath != nil {
|
||||||
entries.SetPath("LOCAL_SOONG_DEXPREOPT_CONFIG", library.dexpreopter.configPath)
|
entries.SetPath("LOCAL_SOONG_DEXPREOPT_CONFIG", library.dexpreopter.configPath)
|
||||||
}
|
}
|
||||||
aconfig.SetAconfigFileMkEntries(&library.ModuleBase, entries, library.mergedAconfigFiles)
|
android.SetAconfigFileMkEntries(&library.ModuleBase, entries, library.mergedAconfigFiles)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -302,7 +301,7 @@ func (binary *Binary) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
if len(binary.dexpreopter.builtInstalled) > 0 {
|
if len(binary.dexpreopter.builtInstalled) > 0 {
|
||||||
entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", binary.dexpreopter.builtInstalled)
|
entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", binary.dexpreopter.builtInstalled)
|
||||||
}
|
}
|
||||||
aconfig.SetAconfigFileMkEntries(&binary.ModuleBase, entries, binary.mergedAconfigFiles)
|
android.SetAconfigFileMkEntries(&binary.ModuleBase, entries, binary.mergedAconfigFiles)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||||
@@ -455,7 +454,7 @@ func (app *AndroidApp) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
entries.SetOptionalPaths("LOCAL_SOONG_LINT_REPORTS", app.linter.reports)
|
entries.SetOptionalPaths("LOCAL_SOONG_LINT_REPORTS", app.linter.reports)
|
||||||
|
|
||||||
if app.Name() != "framework-res" {
|
if app.Name() != "framework-res" {
|
||||||
aconfig.SetAconfigFileMkEntries(&app.ModuleBase, entries, app.mergedAconfigFiles)
|
android.SetAconfigFileMkEntries(&app.ModuleBase, entries, app.mergedAconfigFiles)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -533,7 +532,7 @@ func (a *AndroidLibrary) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
entries.SetPath("LOCAL_FULL_MANIFEST_FILE", a.mergedManifestFile)
|
entries.SetPath("LOCAL_FULL_MANIFEST_FILE", a.mergedManifestFile)
|
||||||
entries.SetPath("LOCAL_SOONG_EXPORT_PROGUARD_FLAGS", a.combinedExportedProguardFlagsFile)
|
entries.SetPath("LOCAL_SOONG_EXPORT_PROGUARD_FLAGS", a.combinedExportedProguardFlagsFile)
|
||||||
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true)
|
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true)
|
||||||
aconfig.SetAconfigFileMkEntries(&a.ModuleBase, entries, a.mergedAconfigFiles)
|
android.SetAconfigFileMkEntries(&a.ModuleBase, entries, a.mergedAconfigFiles)
|
||||||
})
|
})
|
||||||
|
|
||||||
return entriesList
|
return entriesList
|
||||||
|
@@ -86,6 +86,9 @@ type AndroidAppImport struct {
|
|||||||
hideApexVariantFromMake bool
|
hideApexVariantFromMake bool
|
||||||
|
|
||||||
provenanceMetaDataFile android.OutputPath
|
provenanceMetaDataFile android.OutputPath
|
||||||
|
|
||||||
|
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||||
|
mergedAconfigFiles map[string]android.Paths
|
||||||
}
|
}
|
||||||
|
|
||||||
type AndroidAppImportProperties struct {
|
type AndroidAppImportProperties struct {
|
||||||
@@ -377,6 +380,7 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext
|
|||||||
artifactPath := android.PathForModuleSrc(ctx, *a.properties.Apk)
|
artifactPath := android.PathForModuleSrc(ctx, *a.properties.Apk)
|
||||||
a.provenanceMetaDataFile = provenance.GenerateArtifactProvenanceMetaData(ctx, artifactPath, a.installPath)
|
a.provenanceMetaDataFile = provenance.GenerateArtifactProvenanceMetaData(ctx, artifactPath, a.installPath)
|
||||||
}
|
}
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &a.mergedAconfigFiles)
|
||||||
|
|
||||||
// TODO: androidmk converter jni libs
|
// TODO: androidmk converter jni libs
|
||||||
}
|
}
|
||||||
|
@@ -89,6 +89,9 @@ type Droidstubs struct {
|
|||||||
metadataZip android.WritablePath
|
metadataZip android.WritablePath
|
||||||
metadataDir android.WritablePath
|
metadataDir android.WritablePath
|
||||||
|
|
||||||
|
// Single aconfig "cache file" merged from this module and all dependencies.
|
||||||
|
mergedAconfigFiles map[string]android.Paths
|
||||||
|
|
||||||
exportableApiFile android.WritablePath
|
exportableApiFile android.WritablePath
|
||||||
exportableRemovedApiFile android.WritablePath
|
exportableRemovedApiFile android.WritablePath
|
||||||
exportableNullabilityWarningsFile android.WritablePath
|
exportableNullabilityWarningsFile android.WritablePath
|
||||||
@@ -1255,6 +1258,7 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
|
|
||||||
rule.Build("nullabilityWarningsCheck", "nullability warnings check")
|
rule.Build("nullabilityWarningsCheck", "nullability warnings check")
|
||||||
}
|
}
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &d.mergedAconfigFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Droidstubs) createApiContribution(ctx android.DefaultableHookContext) {
|
func (d *Droidstubs) createApiContribution(ctx android.DefaultableHookContext) {
|
||||||
|
@@ -71,6 +71,9 @@ type PythonBinaryModule struct {
|
|||||||
installedDest android.Path
|
installedDest android.Path
|
||||||
|
|
||||||
androidMkSharedLibs []string
|
androidMkSharedLibs []string
|
||||||
|
|
||||||
|
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
|
||||||
|
mergedAconfigFiles map[string]android.Paths
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ android.AndroidMkEntriesProvider = (*PythonBinaryModule)(nil)
|
var _ android.AndroidMkEntriesProvider = (*PythonBinaryModule)(nil)
|
||||||
@@ -103,6 +106,7 @@ func (p *PythonBinaryModule) GenerateAndroidBuildActions(ctx android.ModuleConte
|
|||||||
p.buildBinary(ctx)
|
p.buildBinary(ctx)
|
||||||
p.installedDest = ctx.InstallFile(installDir(ctx, "bin", "", ""),
|
p.installedDest = ctx.InstallFile(installDir(ctx, "bin", "", ""),
|
||||||
p.installSource.Base(), p.installSource)
|
p.installSource.Base(), p.installSource)
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &p.mergedAconfigFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PythonBinaryModule) buildBinary(ctx android.ModuleContext) {
|
func (p *PythonBinaryModule) buildBinary(ctx android.ModuleContext) {
|
||||||
@@ -166,6 +170,7 @@ func (p *PythonBinaryModule) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
entries.SetString("LOCAL_MODULE_STEM", stem)
|
entries.SetString("LOCAL_MODULE_STEM", stem)
|
||||||
entries.AddStrings("LOCAL_SHARED_LIBRARIES", p.androidMkSharedLibs...)
|
entries.AddStrings("LOCAL_SHARED_LIBRARIES", p.androidMkSharedLibs...)
|
||||||
entries.SetBool("LOCAL_CHECK_ELF_FILES", false)
|
entries.SetBool("LOCAL_CHECK_ELF_FILES", false)
|
||||||
|
android.SetAconfigFileMkEntries(&p.ModuleBase, entries, p.mergedAconfigFiles)
|
||||||
})
|
})
|
||||||
|
|
||||||
return []android.AndroidMkEntries{entries}
|
return []android.AndroidMkEntries{entries}
|
||||||
|
@@ -149,6 +149,7 @@ func (p *PythonTestModule) GenerateAndroidBuildActions(ctx android.ModuleContext
|
|||||||
// just use buildBinary() so that the binary is not installed into the location
|
// just use buildBinary() so that the binary is not installed into the location
|
||||||
// it would be for regular binaries.
|
// it would be for regular binaries.
|
||||||
p.PythonLibraryModule.GenerateAndroidBuildActions(ctx)
|
p.PythonLibraryModule.GenerateAndroidBuildActions(ctx)
|
||||||
|
android.CollectDependencyAconfigFiles(ctx, &p.mergedAconfigFiles)
|
||||||
p.buildBinary(ctx)
|
p.buildBinary(ctx)
|
||||||
|
|
||||||
var configs []tradefed.Option
|
var configs []tradefed.Option
|
||||||
@@ -228,6 +229,7 @@ func (p *PythonTestModule) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
}
|
}
|
||||||
|
|
||||||
entries.SetBoolIfTrue("LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG", !BoolDefault(p.binaryProperties.Auto_gen_config, true))
|
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)
|
p.testProperties.Test_options.SetAndroidMkEntries(entries)
|
||||||
})
|
})
|
||||||
|
@@ -17,7 +17,6 @@ package rust
|
|||||||
import (
|
import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"android/soong/aconfig"
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -67,7 +66,7 @@ func (mod *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
if mod.UseVndk() {
|
if mod.UseVndk() {
|
||||||
entries.SetBool("LOCAL_USE_VNDK", true)
|
entries.SetBool("LOCAL_USE_VNDK", true)
|
||||||
}
|
}
|
||||||
aconfig.SetAconfigFileMkEntries(mod.AndroidModuleBase(), entries, mod.mergedAconfigFiles)
|
android.SetAconfigFileMkEntries(mod.AndroidModuleBase(), entries, mod.mergedAconfigFiles)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user