diff --git a/src/how-to-build-and-run.md b/src/how-to-build-and-run.md index 557fc914..3ad9a52a 100644 --- a/src/how-to-build-and-run.md +++ b/src/how-to-build-and-run.md @@ -110,6 +110,8 @@ This is just a subset of the full rustc build. The **full** rustc build - Build libstd with stage2 compiler. - Build librustdoc and a bunch of other things. + + ### Creating a rustup toolchain Once you have successfully built rustc, you will have created a bunch @@ -125,6 +127,12 @@ to run the entire test suite). > rustup toolchain link stage2 build//stage2 ``` +The `` would typically be one of the following: + +- Linux: `x86_64-unknown-linux-gnu` +- Mac: `x86_64-apple-darwin` +- Windows: `x86_64-pc-windows-msvc` + Now you can run the rustc you built with. If you run with `-vV`, you should see a version number ending in `-dev`, indicating a build from your local environment: diff --git a/src/profiling/with_perf.md b/src/profiling/with_perf.md index f0f6aada..740b0a26 100644 --- a/src/profiling/with_perf.md +++ b/src/profiling/with_perf.md @@ -12,7 +12,7 @@ This is a guide for how to profile rustc with [perf](https://perf.wiki.kernel.or - leave everything else the defaults - Run `./x.py build` to get a full build - Make a rustup toolchain (let's call it `rust-prof`) pointing to that result - - `rustup toolchain link ` + - see [the "build and run" section for instructions](../how-to-build-and-run.html#toolchain) ## Gathering a perf profile @@ -118,7 +118,7 @@ the `cargo rustc` command, like so: ```bash > touch src/lib.rs -> CARGO_INCREMENTAL=0 perf record -F99 --call-graph dwarf cargo rustc --profile check --lib — -Zborrowck=mir +> CARGO_INCREMENTAL=0 perf record -F99 --call-graph dwarf cargo rustc --profile check --lib -- -Zborrowck=mir ``` [pf]: https://github.com/nikomatsakis/perf-focus