The build script runs rustc -V rather than $RUSTC -V causing rustup to install the toolchain in rust-toolchain.toml even when a different rustc version is used for compiling. For example when building as part of the rust mono repo where the bootstrap compiler would be used instead.