Fix stripping on Darwin
The strip tool is different on Darwin, use a separate darwinStrip rule
instead of calling strip.sh for host builds on Darwin.
Change-Id: I6d421cba0dcea04367d5bc638a03f64c81e2ead0
diff --git a/cc/x86_darwin_host.go b/cc/x86_darwin_host.go
index 559a9a5..52add5c 100644
--- a/cc/x86_darwin_host.go
+++ b/cc/x86_darwin_host.go
@@ -105,6 +105,11 @@
return strings.TrimSpace(string(bytes)), err
})
+ pctx.VariableFunc("macStripPath", func(config interface{}) (string, error) {
+ bytes, err := exec.Command("xcrun", "--find", "strip").Output()
+ return strings.TrimSpace(string(bytes)), err
+ })
+
pctx.StaticVariable("darwinGccVersion", darwinGccVersion)
pctx.SourcePathVariable("darwinGccRoot",
"prebuilts/gcc/${HostPrebuiltTag}/host/i686-apple-darwin-${darwinGccVersion}")