Stage1-sysroot missing?

I've managed to compile stage1 rustc and cargo (stage1 cargo is build only when I compile stage2 for some reason) after reading through How to build and run the compiler - Rust Compiler Development Guide.

bootstrap.toml:

# See bootstrap.example.toml for documentation of available options
#
profile = "compiler"  # Includes one of the default files in src/bootstrap/defaults
change-id = 140732

[build]
build = "x86_64-unknown-linux-gnu"
host = ["x86_64-unknown-linux-gnu"]
target = ["x86_64-unknown-linux-gnu", "thumbv7em-none-eabi"]
extended = true
build-stage = 2
#tools = ["cargo"]

I'm trying to make a toolchain that I can use to cargo build a no-std crate for embedded thumbv7em-none-eabi target.

$ rustup toolchain link stage1 build/host/stage1
$ cargo build
error: 'cargo' is not installed for the custom toolchain 'stage1'.
note: this is a custom toolchain, which cannot use `rustup component add`
help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`

From what I understand I'd need something like stage1-sysroot but I can't find any mention of such thing.

What am I missing?

If this is not the right place to ask this question I'd appreciate somebody pointing me to one.

Try rustup install nightly. For linked toolchains rustup will fall back to looking for cargo in the nightly toolchain if it is missing in the linked toolchain.

1 Like

This workaround is suitable for my needs. Thanks!