diff options
author | 2020-11-24 16:01:35 +0000 | |
---|---|---|
committer | 2020-11-24 16:01:35 +0000 | |
commit | e5218b6be65ff20832318123d69a6730c02f15d1 (patch) | |
tree | 2da07186c340b0a043748e97a2e009602b4e7699 /android/module.go | |
parent | f503dc3ba139578743697ad696f1a909bbe61499 (diff) | |
parent | e9fe2949b887deba2b46b2a8c043f228a95e99e3 (diff) |
Merge "Annotate dependency tags for dependencies of installed files"
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/android/module.go b/android/module.go index 7a0509627..bd60829f1 100644 --- a/android/module.go +++ b/android/module.go @@ -1286,14 +1286,18 @@ func (m *ModuleBase) ExportedToMake() bool { return m.commonProperties.NamespaceExportedToMake } +// computeInstallDeps finds the installed paths of all dependencies that have a dependency +// tag that is annotated as needing installation via the IsInstallDepNeeded method. func (m *ModuleBase) computeInstallDeps(ctx blueprint.ModuleContext) InstallPaths { - var result InstallPaths - // TODO(ccross): we need to use WalkDeps and have some way to know which dependencies require installation - ctx.VisitDepsDepthFirst(func(m blueprint.Module) { - if a, ok := m.(Module); ok { - result = append(result, a.FilesToInstall()...) + ctx.WalkDeps(func(child, parent blueprint.Module) bool { + if a, ok := child.(Module); ok { + if IsInstallDepNeeded(ctx.OtherModuleDependencyTag(child)) { + result = append(result, a.FilesToInstall()...) + return true + } } + return false }) return result |