Stage 0 bootstrap doesn't make any files for $TARGET
ā Rust š 2025-09-12 š¤ surdeus šļø 10I have a question for those who have tried cross-compiling rustc.
When building stage 0, is it normal for
rustc-src/build/$HOST/stage0-sysroot/lib/rustlib/$TARGET/lib
to be empty?
Iām cross-compiling on Gentoo, but a package that depends on Rust keeps failing to build because the standard library is missing. Even when I try to build std, the directory ends up completely empty.
I used this command to build rustc
python x.py build -vv --config bootstrap.toml -j16 library/std --stage 0
My bootstrap.toml looks like this (This is not original bootstrap.toml from Gentoo, it's adjusted for ArchLinux):
[build]
build = "x86_64-unknown-linux-gnu"
host = ["x86_64-unknown-linux-gnu"]
target = ["riscv64gc-unknown-linux-gnu"]
cargo = "/usr/bin/cargo"
rustc = "/usr/bin/rustc"
submodules = false
python = "python3.13"
locked-deps = true
vendor = true
extended = true
verbose = 2
cargo-native-static = false
[install]
prefix = "/usr/lib/rust-std/1.89.0"
sysconfdir = "etc"
docdir = "share/doc/rust"
bindir = "bin"
libdir = "lib"
mandir = "share/man"
[rust]
# https://github.com/rust-lang/rust/issues/54872
codegen-units-std = 1
optimize = true
debug = false
debug-assertions = false
debuginfo-level-rustc = 0
backtrace = true
incremental = false
default-linker = "x86_64-unknown-linux-gnu-gcc"
rpath = false
dist-src = false
remap-debuginfo = true
jemalloc = false
[dist]
src-tarball = false
[target.riscv64gc-unknown-linux-gnu]
ar = "riscv64-linux-gnu-ar"
cc = "riscv64-linux-gnu-gcc"
cxx = "riscv64-linux-gnu-g++"
linker = "riscv64-linux-gnu-gcc"
ranlib = "riscv64-linux-gnu-ranlib"
3 posts - 1 participant
š·ļø Rust_feed