Use `Path` instead of string for file paths
This centralizes verification and common operations, like converting the
path to a source file to the path for a built object.
It also embeds the configuration knowledge into the path, so that we can
remove "${SrcDir}/path" from the ninja file. When SrcDir is '.', that
leads to paths like './path' instead of just 'path' like make is doing,
causing differences in compiled binaries.
Change-Id: Ib4e8910a6e867ce1b7b420d927c04f1142a7589e
diff --git a/cc/x86_darwin_host.go b/cc/x86_darwin_host.go
index 108bb85..9693de6 100644
--- a/cc/x86_darwin_host.go
+++ b/cc/x86_darwin_host.go
@@ -83,8 +83,8 @@
pctx.StaticVariable("macSdkRoot", "${macSdkPath}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk")
pctx.StaticVariable("darwinGccVersion", darwinGccVersion)
- pctx.StaticVariable("darwinGccRoot",
- "${SrcDir}/prebuilts/gcc/${HostPrebuiltTag}/host/i686-apple-darwin-${darwinGccVersion}")
+ pctx.SourcePathVariable("darwinGccRoot",
+ "prebuilts/gcc/${HostPrebuiltTag}/host/i686-apple-darwin-${darwinGccVersion}")
pctx.StaticVariable("darwinGccTriple", "i686-apple-darwin11")