Add VisitDirectDepsWithTag
Add a method on ModuleContext and TopDownMutatorContext to visit direct dependencies that have a given dependency tag. Test: m checkbuild Change-Id: Ib875563091dcae6b7282b3e3427d0eb07d8c8af5
This commit is contained in:
@@ -109,13 +109,11 @@ func PrebuiltSelectModuleMutator(ctx TopDownMutatorContext) {
|
||||
p.properties.UsePrebuilt = p.usePrebuilt(ctx, nil)
|
||||
}
|
||||
} else if s, ok := ctx.Module().(Module); ok {
|
||||
ctx.VisitDirectDeps(func(m Module) {
|
||||
if ctx.OtherModuleDependencyTag(m) == prebuiltDepTag {
|
||||
p := m.(PrebuiltInterface).Prebuilt()
|
||||
if p.usePrebuilt(ctx, s) {
|
||||
p.properties.UsePrebuilt = true
|
||||
s.SkipInstall()
|
||||
}
|
||||
ctx.VisitDirectDepsWithTag(prebuiltDepTag, func(m Module) {
|
||||
p := m.(PrebuiltInterface).Prebuilt()
|
||||
if p.usePrebuilt(ctx, s) {
|
||||
p.properties.UsePrebuilt = true
|
||||
s.SkipInstall()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user