Add helper functions for getting output files from modules
Add OutputFileForModule and OutputFilesForModules to get paths from
OutputFileProducers.
Bug: 122332855
Test: m checkbuild
Change-Id: I2e9aeeb55987742077250390cdb804ba22e79442
diff --git a/android/paths.go b/android/paths.go
index a04dc6b..d181b75 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -89,6 +89,15 @@
}
}
+func pathContextName(ctx PathContext, module blueprint.Module) string {
+ if x, ok := ctx.(interface{ ModuleName(blueprint.Module) string }); ok {
+ return x.ModuleName(module)
+ } else if x, ok := ctx.(interface{ OtherModuleName(blueprint.Module) string }); ok {
+ return x.OtherModuleName(module)
+ }
+ return "unknown"
+}
+
type Path interface {
// Returns the path in string form
String() string