diff --git a/README.md b/README.md index a3bea9e959..0343ee0adf 100644 --- a/README.md +++ b/README.md @@ -350,16 +350,23 @@ $ rustup target add i686-pc-windows-gnu # this one's installed by default [MinGW/MSYS2 toolchain]: https://msys2.github.io/ [vs]: https://www.visualstudio.com/downloads -## Working with custom toolchains +## Working with custom toolchains and local builds For convenience of developers working on Rust itself, `rustup` can manage -local builds of the Rust toolchain. To teach `rustup` about your build -just run: +local builds of the Rust toolchain. To teach `rustup` about your build, +run: ``` $ rustup toolchain link my-toolchain path/to/my/toolchain/sysroot ``` +For example, on Ubuntu you might clone `rust-lang/rust` into `~/rust`, build it, and then run: + +``` +$ rustup toolchain link myrust ~/rustg/x86_64-unknown-linux-gnu/stage2/ +$ rustup default myrust +``` + Now you can name `my-toolchain` as any other `rustup` toolchain. Create a `rustup` toolchain for each of your `rust-lang/rust` workspaces and test them easily with `rustup run