Closed
Description
I tried this code:
RUSTFLAGS='-Z gcc-ld=lld -C target-cpu=native' cargo +nightly build --release
and this happened:
= note: lld-wrapper: executable has unexpected name: Some("ld64")
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I expected to see this happen: it would compile my crate.
Instead, this happened: lld failed.
Meta
rustc --version --verbose
:
> rustc +nightly --verbose --version
rustc 1.65.0-nightly (8c6ce6b91 2022-09-02)
binary: rustc
commit-hash: 8c6ce6b91b172f77c795a74bfeaf74b865146b3f
commit-date: 2022-09-02
host: x86_64-apple-darwin
release: 1.65.0-nightly
LLVM version: 15.0.0
> ld -v
@(#)PROGRAM:ld PROJECT:ld64-764
BUILD 11:29:01 May 17 2022
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 13.1.6, (clang-1316.0.21.2.5) (static support for 28, runtime is 28)
TAPI support using: Apple TAPI version 13.1.6 (tapi-1316.0.7.3)
> clang -v
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
#100200 fixed the problem that I reported in #97755. There seems to be a new problem with an unknown linker name.
Backtrace
<backtrace>