Using miri with custom toolchain
⚓ Rust 📅 2026-05-20 👤 surdeus 👁️ 1I'm trying to use miri with a custom rust build
# build stage2
./x build src/tools/miri
rustup toolchain link stage2 build/host/stage2
cargo +stage2 miri
info: `cargo` is unavailable for the active toolchain
info: falling back to "/home/USERNAME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo"
Preparing a sysroot for Miri (target: x86_64-unknown-linux-gnu)... fatal error: failed to build sysroot: sysroot build failed; stderr:
error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel
See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
Apparently, it is using the cargo stable, but I would like to use the cargo nightly with my custom toolchain.
Any idea ?
1 post - 1 participant
🏷️ Rust_feed