Add phony targets for go binary modules
Add custom handling to androidmk.go for the bootstrap.GoBinaryTool
interface in order to create .PHONY targets for each tool written
in go.
Bug: 64539926
Test: m checkbuild
Test: m androidmk
Test: m multiproduct_kati
Change-Id: Ic65faa27a6ee4dfbd54ed6d208091db7c1d657a2
diff --git a/android/singleton.go b/android/singleton.go
index fa1efdc..f926435 100644
--- a/android/singleton.go
+++ b/android/singleton.go
@@ -48,6 +48,7 @@
// are expanded in the scope of the PackageContext.
Eval(pctx PackageContext, ninjaStr string) (string, error)
+ VisitAllModulesBlueprint(visit func(blueprint.Module))
VisitAllModules(visit func(Module))
VisitAllModulesIf(pred func(Module) bool, visit func(Module))
// Deprecated: use WalkDeps instead to support multiple dependency tags on the same module
@@ -138,6 +139,10 @@
}
}
+func (s singletonContextAdaptor) VisitAllModulesBlueprint(visit func(blueprint.Module)) {
+ s.SingletonContext.VisitAllModules(visit)
+}
+
func (s singletonContextAdaptor) VisitAllModules(visit func(Module)) {
s.SingletonContext.VisitAllModules(visitAdaptor(visit))
}