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 x.py 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

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

2 Likes

This was also discussed on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/pread64.20and.20pread64.20for.20visionOS.20and.20watchOS.20-.20rust.2F124089