Using miri with custom toolchain

I'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 ?

I think I didn't had the nightly installed

rustup toolchain install nightly

The fallback behavior is part of rustup and is documented here: Toolchains - The rustup book

Thanks!

The solution was the note here: How to build and run the compiler - Rust Compiler Development Guide

Note: the toolchain we’ve built does not include cargo.
In this case, rustup will fall back to using cargo from the installed
nightly, beta, or stable toolchain (in that order).
If you need to use unstable cargo flags, be sure to run rustup install nightly
if you haven’t already. See the rustup documentation on custom toolchains.