Make OutputPath implement objPathProvider
Needed to allow OutputPath to replace some usages of ModuleOutPath.
Bug: 179124768
Test: m droid
Change-Id: I0f746a11c53ed8c9c9193b57afc0b06c0249ff75
diff --git a/android/paths.go b/android/paths.go
index b5a1401..8106958 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -1011,8 +1011,13 @@
return p.config.buildDir
}
+func (p OutputPath) objPathWithExt(ctx ModuleOutPathContext, subdir, ext string) ModuleObjPath {
+ return PathForModuleObj(ctx, subdir, pathtools.ReplaceExtension(p.path, ext))
+}
+
var _ Path = OutputPath{}
var _ WritablePath = OutputPath{}
+var _ objPathProvider = OutputPath{}
// toolDepPath is a Path representing a dependency of the build tool.
type toolDepPath struct {