You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed issue affects arm but not x86.
For x86_64 rust-lld is located in /rust-nightly-x86_64-unknown-linux-gnu/rustc/lib/rustlib/x86_64-unknown-linux-gnu/bin/ while on arm /rust-nightly-x86_64-unknown-linux-gnu/rustc/lib/rustlib/x86_64-unknown-linux-gnu/bin/ doesn't even exist.
Like Emscripten the LLD target is currently only enabled for Tier 1 platforms,
notably OSX/Windows/Linux, and will need to be installed manually for compiling
to wasm on other platforms.
So you would have to install LLD on ARM Linux if want to compile to wasm. After #51936 you would have to pass -C linker=lld to rustc to use system LLD, or we would have to add logic to rustc to make it fallback to system LLD if rust-lld is not available in the sysroot. However, system LLD may not work if it's "too old" (e.g. installed via package manager) because, as of #51966, the wasm target expects LLD ~7.0.
Yes currently we unfortunately don't have enough time on CI to produce these artifacts for all platforms, only those with self-hosted compilers (which build one fewer compiler than the cross-compiled platforms)
For the record, LLVM 8 lld is good enough, but LLVM 7 lld isn't. In Nix, one can just add llvmPackages_8.lld to nativeBuildInputs and set RUSTFLAGS = "-C linker=lld"; in the derivation.
@alexcrichton I know the Rust's CI situation has changed a bit since this issue was first opened. Is it still the case that there isn't enough CI time available to build LLVM tools for (at least some) tier 2 platforms?
I don't want to spam this issue, but I wanted to ask if the situation maybe changed with the switch to GitHub actions?
Also, is there any tracking issue for things blocked on CI capacity? In a quick search, I found #42639, #57438, and #59637, but there are probably more.
Reacted by Berkus Decker, Bobby Reynolds, Dan Cross, EriKWDev and Suraj
Activity
steveklabnik commentedon Jul 14, 2018
Hm, there was some changes around this recently: intermezzOS/kernel@f341033
But that's in target specs, which you don't have.
What's your `rustc +nightly --version'?
shishtpal commentedon Jul 14, 2018
pi@raspberrypi:~ $ rustc +nightly --version
rustc 1.29.0-nightly (64f7de9 2018-07-12)
mati865 commentedon Jul 30, 2018
Looks like docs are outdated, could you try installing
llvm-tools-previewcomponent?shishtpal commentedon Aug 1, 2018
@mati865 I installed
llvm-tools-previewbut error remains the samemati865 commentedon Aug 1, 2018
Indeed issue affects arm but not x86.
For x86_64
rust-lldis located in/rust-nightly-x86_64-unknown-linux-gnu/rustc/lib/rustlib/x86_64-unknown-linux-gnu/bin/while on arm/rust-nightly-x86_64-unknown-linux-gnu/rustc/lib/rustlib/x86_64-unknown-linux-gnu/bin/doesn't even exist.mati865 commentedon Aug 2, 2018
As per #48125
rust-lldis shipped only for Tier 1 platforms.If somebody knows if it's fine to enable it for ARMs builds it's @japaric
japaric commentedon Aug 2, 2018
@mati865
actually that would be @alexcrichton. If it were for me I would enable LLD everywhere it can be built but I don't know how that would affect CI time.
PR #48125 says:
So you would have to install LLD on ARM Linux if want to compile to wasm. After #51936 you would have to pass
-C linker=lldto rustc to use system LLD, or we would have to add logic to rustc to make it fallback to system LLD if rust-lld is not available in the sysroot. However, system LLD may not work if it's "too old" (e.g. installed via package manager) because, as of #51966, the wasm target expects LLD ~7.0.alexcrichton commentedon Aug 2, 2018
Yes currently we unfortunately don't have enough time on CI to produce these artifacts for all platforms, only those with self-hosted compilers (which build one fewer compiler than the cross-compiled platforms)
berkus commentedon Feb 3, 2019
Bah... compiling rust-lld on a rpi3 might prove difficult/more time consuming that on CI. 😭
vielmetti commentedon Mar 28, 2019
I've run into this problem in that I can't generate wasm on arm64.
I'm testing this change to the build flags to see just how long Travis will take: https://github.com/vielmetti/rust/pull/1/commits/684f997e40038729d865e6e0cab59b8f50b99f79
vielmetti commentedon Mar 29, 2019
Based on Plume-org/Plume#394 I can recommend this script as being suitable for installing the lld dependency:
https://github.com/mcrosson/Plume/blob/master/script/wasm-deps.sh
and then you invoke with
RUSTFLAGS="-C linker=lld" cargo buildper the example athttps://github.com/mcrosson/Plume/blob/master/script/plume-front.sh
The note in the PR at Plume-org/Plume#402 says
lukateras commentedon Aug 23, 2019
For the record, LLVM 8 lld is good enough, but LLVM 7 lld isn't. In Nix, one can just add
llvmPackages_8.lldtonativeBuildInputsand setRUSTFLAGS = "-C linker=lld";in the derivation.Mark-Simulacrum commentedon Sep 2, 2019
I'm going to close this as it's not really an actionable issue at this point.
reynoldsbd commentedon Jan 26, 2020
@alexcrichton I know the Rust's CI situation has changed a bit since this issue was first opened. Is it still the case that there isn't enough CI time available to build LLVM tools for (at least some) tier 2 platforms?
alexcrichton commentedon Jan 27, 2020
Unfortunately we haven't had any major changes to CI in the meantime.
phil-opp commentedon Feb 20, 2021
I don't want to spam this issue, but I wanted to ask if the situation maybe changed with the switch to GitHub actions?
Also, is there any tracking issue for things blocked on CI capacity? In a quick search, I found #42639, #57438, and #59637, but there are probably more.