Use ctx.ModuleBuild for darwin ar

Test: builds
Change-Id: If90975c8545158012bc6201acadd136363c21260
diff --git a/android/paths.go b/android/paths.go
index 75e5980..0d26dc0 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -721,3 +721,25 @@
 	}
 	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
+}