Skip to content

Commit 37aa15e

Browse files
nikomatsakismark-i-m
authored andcommitted
link to build-and-run, fix em-dash
1 parent cdc6884 commit 37aa15e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/how-to-build-and-run.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ This is just a subset of the full rustc build. The **full** rustc build
110110
- Build libstd with stage2 compiler.
111111
- Build librustdoc and a bunch of other things.
112112

113+
<a name=toolchain></a>
114+
113115
### Creating a rustup toolchain
114116

115117
Once you have successfully built rustc, you will have created a bunch
@@ -125,6 +127,12 @@ to run the entire test suite).
125127
> rustup toolchain link stage2 build/<host-triple>/stage2
126128
```
127129

130+
The `<host-triple>` would typically be one of the following:
131+
132+
- Linux: `x86_64-unknown-linux-gnu`
133+
- Mac: `x86_64-apple-darwin`
134+
- Windows: `x86_64-pc-windows-msvc`
135+
128136
Now you can run the rustc you built with. If you run with `-vV`, you
129137
should see a version number ending in `-dev`, indicating a build from
130138
your local environment:

src/profiling/with_perf.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This is a guide for how to profile rustc with [perf](https://perf.wiki.kernel.or
1212
- leave everything else the defaults
1313
- Run `./x.py build` to get a full build
1414
- Make a rustup toolchain (let's call it `rust-prof`) pointing to that result
15-
- `rustup toolchain link <path-to-toolchain>`
15+
- see [the "build and run" section for instructions](../how-to-build-and-run.html#toolchain)
1616

1717
## Gathering a perf profile
1818

@@ -118,7 +118,7 @@ the `cargo rustc` command, like so:
118118

119119
```bash
120120
> touch src/lib.rs
121-
> CARGO_INCREMENTAL=0 perf record -F99 --call-graph dwarf cargo rustc --profile check --lib -Zborrowck=mir
121+
> CARGO_INCREMENTAL=0 perf record -F99 --call-graph dwarf cargo rustc --profile check --lib -- -Zborrowck=mir
122122
```
123123

124124
[pf]: https://github.com/nikomatsakis/perf-focus

0 commit comments

Comments
 (0)