summaryrefslogtreecommitdiff
path: root/genrule
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-09-27 19:14:57 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-09-27 19:14:57 +0000
commit2e8239e9a2f27c12b4aca23ad64e41143ef0225d (patch)
tree34f4c68580443ff1fa5e86b5a5ad281d183b1c5a /genrule
parent15f3b9cad269219e7b33ea83b7349800e6b70ce9 (diff)
parent648daea67d55b7e0996923880f45b4923289a26e (diff)
Merge "Remove blueprint.Module helper functions" into main
Diffstat (limited to 'genrule')
-rw-r--r--genrule/genrule.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 0aecc452c..e5222a432 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -317,16 +317,14 @@ func (g *Module) generateCommonBuildActions(ctx android.ModuleContext) {
if len(g.properties.Tools) > 0 {
seenTools := make(map[string]bool)
- ctx.VisitDirectDepsBlueprint(func(module blueprint.Module) {
+ ctx.VisitDirectDepsAllowDisabled(func(module android.Module) {
switch tag := ctx.OtherModuleDependencyTag(module).(type) {
case hostToolDependencyTag:
tool := ctx.OtherModuleName(module)
- if m, ok := module.(android.Module); ok {
- // Necessary to retrieve any prebuilt replacement for the tool, since
- // toolDepsMutator runs too late for the prebuilt mutators to have
- // replaced the dependency.
- module = android.PrebuiltGetPreferred(ctx, m)
- }
+ // Necessary to retrieve any prebuilt replacement for the tool, since
+ // toolDepsMutator runs too late for the prebuilt mutators to have
+ // replaced the dependency.
+ module = android.PrebuiltGetPreferred(ctx, module)
switch t := module.(type) {
case android.HostToolProvider: