rust: Use host linker when building for Mac host.
This behavior is non-hermetic, but matches the behavior of the C++
support. On Linux, using lld works, but on OSX, this fails because lld
does not support Apple's new .tbd files.
Bug: 155302034
Test: On both Linux and Mac hosts:
cd external/rust; mma
Change-Id: I0ad489113d720bdb9c3b7a67cce9d1e72266f428
diff --git a/rust/config/x86_linux_host.go b/rust/config/x86_linux_host.go
index 5376e5b..acc99e1 100644
--- a/rust/config/x86_linux_host.go
+++ b/rust/config/x86_linux_host.go
@@ -21,8 +21,11 @@
)
var (
- LinuxRustFlags = []string{}
- LinuxRustLinkFlags = []string{}
+ LinuxRustFlags = []string{}
+ LinuxRustLinkFlags = []string{
+ "-B${ccConfig.ClangBin}",
+ "-fuse-ld=lld",
+ }
linuxX86Rustflags = []string{}
linuxX86Linkflags = []string{}
linuxX8664Rustflags = []string{}