summaryrefslogtreecommitdiff
path: root/android/prebuilt.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2017-12-30 17:54:27 -0800
committer Colin Cross <ccross@android.com> 2018-01-02 18:23:43 -0800
commitee6143cde25cbe41df754337de89d608ca890bb1 (patch)
tree7e972f8184630590cc38542c9cda9758cd7609f1 /android/prebuilt.go
parentb4330e222b8df54727d0054075d63f2dcdf0a959 (diff)
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
Diffstat (limited to 'android/prebuilt.go')
-rw-r--r--android/prebuilt.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/android/prebuilt.go b/android/prebuilt.go
index d3f970416..9356aabb9 100644
--- a/android/prebuilt.go
+++ b/android/prebuilt.go
@@ -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()
}
})
}