Use ctx.ModuleBuild for darwin ar

Test: builds
Change-Id: If90975c8545158012bc6201acadd136363c21260
This commit is contained in:
Colin Cross
2017-05-09 13:34:34 -07:00
parent 51d4ab2d5e
commit 5b52959c99
3 changed files with 56 additions and 32 deletions

View File

@@ -721,3 +721,25 @@ func validatePath(ctx PathContext, paths ...string) string {
}
return validateSafePath(ctx, paths...)
}
type testPath struct {
basePath
}
func (p testPath) String() string {
return p.path
}
func PathForTesting(paths ...string) Path {
p := validateSafePath(nil, paths...)
return testPath{basePath{path: p, rel: p}}
}
func PathsForTesting(strs []string) Paths {
p := make(Paths, len(strs))
for i, s := range strs {
p[i] = PathForTesting(s)
}
return p
}