File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ This is just a subset of the full rustc build. The **full** rustc build
110
110
- Build libstd with stage2 compiler.
111
111
- Build librustdoc and a bunch of other things.
112
112
113
+ <a name =toolchain ></a >
114
+
113
115
### Creating a rustup toolchain
114
116
115
117
Once you have successfully built rustc, you will have created a bunch
@@ -125,6 +127,12 @@ to run the entire test suite).
125
127
> rustup toolchain link stage2 build/< host-triple> /stage2
126
128
```
127
129
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
+
128
136
Now you can run the rustc you built with. If you run with ` -vV ` , you
129
137
should see a version number ending in ` -dev ` , indicating a build from
130
138
your local environment:
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ This is a guide for how to profile rustc with [perf](https://perf.wiki.kernel.or
12
12
- leave everything else the defaults
13
13
- Run ` ./x.py build ` to get a full build
14
14
- 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)
16
16
17
17
## Gathering a perf profile
18
18
@@ -118,7 +118,7 @@ the `cargo rustc` command, like so:
118
118
119
119
``` bash
120
120
> 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
122
122
```
123
123
124
124
[ pf ] : https://github.com/nikomatsakis/perf-focus
You can’t perform that action at this time.
0 commit comments