Closed mqudsi closed 6 months ago
Unless I am misunderstanding you, this is the expected behavior. It needs to download the host rustc (x86_64-unknown-linux-gnu) along with its standard library, and then the target (x86_64-unknown-none) standard library. Host toolchains don't exist for -none
targets, so I'm guessing you may be referring to the rust-std-nightly-x86_64-unknown-none
download, which is the "standard library" for the requested target. It needs to also download the standard library for the host toolchain to handle proc-macros and cargo build scripts.
Hey thanks for the speedy reply.
I didn't realize you necessarily needed the host toolchain if you're strictly "cross-compiling" for the explicit target, but that makes sense once I stop and think about it.
rust-std-nightly-x86_64-unknown-none download, which is the "standard library" for the requested target
I guess I am curious what actually gets downloaded for rust-std-nightly-x86_64-unknown-none
given that x86_64-unknown-none
doesn't have a standard library and is a no_std
-only target, though?
"standard library" is an umbrella term that refers to std, alloc, core, proc_macro, test, etc. no_std
targets are just those missing the std
crate.
I am trying to do an llvm ir regression bisection that reproduces without the standard library and without a binary. I can manually use
cargo --target x86_64-unknown rustc --release -- -C opt-level=3 -C debuginfo=0 -C target-cpu=x86-64 --emit=llvm-ir
to generate the.ll
file I need to inspect with a#![no_main]
#![no_std]
src/lib.rs
file.But when I use
I watch it download and install the
x86_64-unknown-linux-gnu
target/toolchain then thex86_64-unknown-none
toolchain/target for each nightly.