如果您想在 1.70 之前使用 lld 或用于非默认的不同工具链,您可以修改您的设置.cargo/config.toml以设置 rustc 将使用的链接器。 [target.x86_64-pc-windows-msvc]rustflags= ["-C","link-arg=-fuse-ld=lld"][target.x86_64-pc-windows-gnu]rustflags= ["-C","link-arg=-fuse-ld=lld"][target.x8...
RUSTFLAGS="-Z linker-features=-lld" cargo run --release👍1👀2 Activity Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment AssigneesNo one assigned Labels C-bugCategory: This is a bug.needs-triageThis issue may need triage. Remove it if...
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...
rust 即使指定了`linker=lld-link`,`cargo`也使用`x86_64-w 64-mingw 32-ld`你试过在[target....
(I also had to specify -L /lib -L /usr/lib in my RUSTFLAGS to even be able to find the library, but that's a separate issue - #130062) 77d2cb0e3483:~/aya# RUSTFLAGS="-L /lib -L /usr/lib" cargo build --target x86_64-unknown-linux-musl --config "target.x86_64-unknown-...
which is related to the flags that I setup (I need them to be compatible with multithreading btw). I also tried to replace std::thread with wasm_thread crate but got exactly the same issue when using the flags for multithreading. Any idea on how to solve my issue, please? Any help wo...
RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib-gabi" - run: cargo test if: contains(matrix.os, 'ubuntu') env: RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib-gnu" RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib" # Test that, on macOS, packe...
The following example has recently started causing rust-lld to crash on x86_64-pc-windows-gnu: #![no_main] #![allow(internal_features)] #![feature(no_core)] #![feature(lang_items)] #![no_core] #[lang = "sized"] pub trait Sized { // Empty...
There's two useful debugging flags when testing this: first enable logging the linker commandRUSTC_LOG=rustc_codegen_ssa::back::link=info, second ask the linker to log its versionRUSTFLAGS='-Clink-arg=-Wl,-v'which also causescollect2to log the full path to whichld.lldit has chosen (...