aboutsummaryrefslogtreecommitdiffstats
path: root/android/paths.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-12-11 15:51:44 -0800
committerColin Cross <ccross@android.com>2017-12-11 16:30:14 -0800
commit74e3fe4cd41f4846ddacef9235dbae826eeae83f (patch)
tree68426d43ad4885971c9194b561ded79fd72ebd7a /android/paths.go
parent366938f268c45ca002b2f3efa6d5e70e04a65ba6 (diff)
downloadbuild_soong-74e3fe4cd41f4846ddacef9235dbae826eeae83f.tar.gz
build_soong-74e3fe4cd41f4846ddacef9235dbae826eeae83f.tar.bz2
build_soong-74e3fe4cd41f4846ddacef9235dbae826eeae83f.zip
Fix PathForPhony
PathForPhony was prefixing out/soong to all of the phony targets. Test: m checkbuild Change-Id: If54d9c692b79751a09eef76c734dd2a1f7db325b
Diffstat (limited to 'android/paths.go')
-rw-r--r--android/paths.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/android/paths.go b/android/paths.go
index 80863c96..e47b9e4b 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -906,9 +906,18 @@ func PathForPhony(ctx PathContext, phony string) WritablePath {
if strings.ContainsAny(phony, "$/") {
reportPathError(ctx, "Phony target contains invalid character ($ or /): %s", phony)
}
- return OutputPath{basePath{phony, ctx.Config(), ""}}
+ return PhonyPath{basePath{phony, ctx.Config(), ""}}
}
+type PhonyPath struct {
+ basePath
+}
+
+func (p PhonyPath) writablePath() {}
+
+var _ Path = PhonyPath{}
+var _ WritablePath = PhonyPath{}
+
type testPath struct {
basePath
}