Fix build on older Macs with universal binary Clang
Our Clang is not built to handle old linkers by default, so if we do not
configure this explicitly it may attempt to use flags that are not
supported by the version of the Darwin linker installed on the build
machine.
Bug: 191276541
Test: build rs on 10.13
Change-Id: Ia40170b6aeba11fb6997021ec3f73e911e0b057c
diff --git a/cc/config/x86_darwin_host.go b/cc/config/x86_darwin_host.go
index d8e70e1..23fe1ab 100644
--- a/cc/config/x86_darwin_host.go
+++ b/cc/config/x86_darwin_host.go
@@ -49,6 +49,7 @@
"-Wl,-syslibroot,${macSdkRoot}",
"-mmacosx-version-min=${macMinVersion}",
"-m64",
+ "-mlinker-version=305",
}
darwinSupportedSdkVersions = []string{