diff options
author | 2025-01-08 22:04:35 +0000 | |
---|---|---|
committer | 2025-01-08 22:04:35 +0000 | |
commit | 9c6b67661ac6b2663ea25403f2e422ae3b888024 (patch) | |
tree | 453377772a297252b312a6f1a99297eb5535769e /filesystem/filesystem.go | |
parent | 0149d1bab2d8ff9fc4eee979e63cc59543be14f6 (diff) |
Don't include disabled modules in linker config files.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: Ie327e03418e8762771fdbf290a35293aa5fb8e17
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r-- | filesystem/filesystem.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index 6dfbfd1be..bd8018b80 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -1081,7 +1081,10 @@ func (f *filesystem) getLibsForLinkerConfig(ctx android.ModuleContext) ([]androi modulesInPackageByName := make(map[string]bool) deps := f.gatherFilteredPackagingSpecs(ctx) - ctx.WalkDeps(func(child, parent android.Module) bool { + ctx.WalkDeps(func(child, _ android.Module) bool { + if !child.Enabled(ctx) { + return false + } for _, ps := range android.OtherModuleProviderOrDefault( ctx, child, android.InstallFilesProvider).PackagingSpecs { if _, ok := deps[ps.RelPathInPackage()]; ok && ps.Partition() == f.PartitionType() { @@ -1100,6 +1103,9 @@ func (f *filesystem) getLibsForLinkerConfig(ctx android.ModuleContext) ([]androi var requireModules []android.Module ctx.WalkDeps(func(child, parent android.Module) bool { + if !child.Enabled(ctx) { + return false + } _, parentInPackage := modulesInPackageByModule[parent] _, childInPackageName := modulesInPackageByName[child.Name()] |