summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-01-08 22:54:44 +0000
committer Yu Liu <yudiliu@google.com> 2025-01-08 23:29:54 +0000
commit68a70b701baca04f5a773b0df49c850cd59a8cfe (patch)
tree45556ffad81c82bc4753e4a70c0b11637a798f3a /filesystem/filesystem.go
parent97880e1afa6b8749cb3bb67b85cd5c86a95d3519 (diff)
Convert getLibsForLinkerConfig to use ModuleProxy.
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: Ib8020db0d1cf9e035ace52e2a893bb3df7975127
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index bd8018b80..9055546d3 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -1075,14 +1075,14 @@ func (f *filesystemDefaults) GenerateAndroidBuildActions(ctx android.ModuleConte
// `linkerconfig.BuildLinkerConfig` will convert these two to a linker.config.pb for the filesystem
// (1) will be added to --provideLibs if they are C libraries with a stable interface (has stubs)
// (2) will be added to --requireLibs if they are C libraries with a stable interface (has stubs)
-func (f *filesystem) getLibsForLinkerConfig(ctx android.ModuleContext) ([]android.Module, []android.Module) {
+func (f *filesystem) getLibsForLinkerConfig(ctx android.ModuleContext) ([]android.ModuleProxy, []android.ModuleProxy) {
// we need "Module"s for packaging items
- modulesInPackageByModule := make(map[android.Module]bool)
+ modulesInPackageByModule := make(map[android.ModuleProxy]bool)
modulesInPackageByName := make(map[string]bool)
deps := f.gatherFilteredPackagingSpecs(ctx)
- ctx.WalkDeps(func(child, _ android.Module) bool {
- if !child.Enabled(ctx) {
+ ctx.WalkDepsProxy(func(child, parent android.ModuleProxy) bool {
+ if !android.OtherModuleProviderOrDefault(ctx, child, android.CommonModuleInfoKey).Enabled {
return false
}
for _, ps := range android.OtherModuleProviderOrDefault(
@@ -1096,14 +1096,14 @@ func (f *filesystem) getLibsForLinkerConfig(ctx android.ModuleContext) ([]androi
return true
})
- provideModules := make([]android.Module, 0, len(modulesInPackageByModule))
+ provideModules := make([]android.ModuleProxy, 0, len(modulesInPackageByModule))
for mod := range modulesInPackageByModule {
provideModules = append(provideModules, mod)
}
- var requireModules []android.Module
- ctx.WalkDeps(func(child, parent android.Module) bool {
- if !child.Enabled(ctx) {
+ var requireModules []android.ModuleProxy
+ ctx.WalkDepsProxy(func(child, parent android.ModuleProxy) bool {
+ if !android.OtherModuleProviderOrDefault(ctx, child, android.CommonModuleInfoKey).Enabled {
return false
}
_, parentInPackage := modulesInPackageByModule[parent]