-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsA-rustflagsArea: rustflagsArea: rustflagsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Description
Problem
I'm thinking of if it is possible to use rust-lld installed by rustup component add llvm-tools-preview
using a one-line config like linker=rust-lld
. Currently configuring it on macOS is relatively hard.
Basically what I'm doing now is like:
rustflags = [
"-Clink-arg=-fuse-ld=/Users/skyzh/.rustup/toolchains/nightly-2022-10-16-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/gcc-ld/ld64.lld",
]
Probably we can do something to make the configuration easier?
Proposed Solution
If linker = 'rust-lld'
in config.toml
, we can automatically generate the args for rustc by appending
"-Clink-arg=-fuse-ld=${RUSTUP_TOOLCHAIN_PATH}/lib/rustlib/${ARCH}/bin/gcc-ld/ld64.lld"
to rustflags, so that we can easily use the rust-lld linker installed with rustup.
Notes
No response
kornelski
Metadata
Metadata
Assignees
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsA-rustflagsArea: rustflagsArea: rustflagsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.