Closed autarch closed 1 month ago
This doesn't seem to be an issue with the latest repo version of cross
for some reason. I don't see -fuse-ld=lld
in the rustc
commands that are run. This didn't require any changes to my crate's config.
fuse-ld=lld
requires GCC 9. The new feature enabled in nightly-2024-05-18
for toolchain x86_64-unknown-linux-gnu
doesn't use the system LLVM, instead it uses a self-contained lld called rust-lld
inside the toolchain bin
folder (which is also put in path).
I'll have to investigate why it doesn't work on 0.2.5
The pre-build
you shared should not work, ~
refers to the home of root
. The rustflags setting you shared should have worked though.
upstream changes: https://github.com/rust-lang/rust/pull/124129 announcement: https://blog.rust-lang.org/2024/05/17/enabling-rust-lld-on-linux.html
Running into this too when cross compiling nightly from x86-64 to Aarch64. Seems like a regression in Rust to me.
This should now be fixed with new nightly builds, thanks @VorpalBlade for reporting it upstream!
Checklist
Describe your issue
Compilation fails on many platforms (maybe all?) because of this change in nightly:
I've tried lots of different methods of passing in the flag to tell it not to use
lld
, including:Setting
RUSTFLAGS
when I invokecross
.Various changes to my
Cargo.toml
:And also:
None of these worked.
What target(s) are you cross-compiling for?
aarch64-unknown-freebsd
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.5
Example
I think this will fail on any project.
Additional information / notes
No response