How to build rustc with -Zbuild-std working? [solved]

I've patched rustc, and I'd like to see how it behaves with crates compiled using -Zbuild-std. However, I can't find how to configure build to create a sysroot that works with rustup-linked dev toolchain.

I've tried stage2 and stage3 compilers. I have extended = true and tools = ["src"] in config.toml. Cargo fails with:

Worktree root at '/stage3/lib/rustlib/src/rust' is not a directory

Also how to make other targets like wasm built?

1 Like

./ install is required to get the std source. [install] prefix = configures the dir, and that dir works with rustup toolchain link.


This was also discussed on Zulip: