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
This commit is contained in:
Jeff Vander Stoep
2020-07-15 21:34:45 +02:00
parent ec7f59c7df
commit 6e97a7b4a1
3 changed files with 13 additions and 5 deletions

View File

@@ -21,8 +21,10 @@ import (
)
var (
DarwinRustFlags = []string{}
DarwinRustLinkFlags = []string{}
DarwinRustFlags = []string{}
DarwinRustLinkFlags = []string{
"-B${ccConfig.MacToolPath}",
}
darwinX8664Rustflags = []string{}
darwinX8664Linkflags = []string{}
)