You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
that will automatically run `x.py test tidy --bless` on each commit, to ensure
11
+
that will automatically run `./x.py test tidy --bless` on each commit, to ensure
12
12
your code is up to par. If you decide later that this behavior is
13
13
undesirable, you can delete the `pre-commit` file in `.git/hooks`.
14
14
15
15
A prebuilt git hook lives at [`src/etc/pre-commit.sh`](https://github.com/rust-lang/rust/blob/master/src/etc/pre-commit.sh) which can be copied into your `.git/hooks` folder as `pre-commit` (without the `.sh` extension!).
16
16
17
-
You can also install the hook as a step of running `x.py setup`!
17
+
You can also install the hook as a step of running `./x.py setup`!
18
18
19
19
## Configuring `rust-analyzer` for `rustc`
20
20
@@ -43,7 +43,7 @@ you can write: <!-- date: 2021-09 --><!-- the date comment is for the edition be
43
43
```
44
44
45
45
in your `.vscode/settings.json` file. This will ask `rust-analyzer` to use
46
-
`x.py check` to check the sources, and the stage 0 rustfmt to format them.
46
+
`./x.py check` to check the sources, and the stage 0 rustfmt to format them.
47
47
48
48
> NOTE: Make sure to replace `TARGET_TRIPLE` in the `rust-analyzer.rustfmt.overrideCommand`
49
49
> setting with the appropriate target triple for your machine. An example of such
@@ -55,7 +55,7 @@ If you're running `coc.nvim`, you can use `:CocLocalConfig` to create a
`rustc` is a _bootstrapping_ compiler, which means that it is written in Rust
172
172
and thus needs to be compiled by itself. So where do you
@@ -177,7 +177,7 @@ to build a new compiler. Then, we use that compiler to build itself. Thus,
177
177
178
178
[boot]: ./building/bootstrapping.md
179
179
180
-
We have a special tool `./x.py` that drives this process. It is used for
180
+
We have a special tool `x.py` that drives this process. It is used for
181
181
building the compiler, the standard libraries, and `rustdoc`. It is also used
182
182
for driving CI and building the final release artifacts.
183
183
@@ -195,14 +195,14 @@ should still read the rest of the section:
195
195
196
196
| Command | When to use it |
197
197
| --- | --- |
198
-
|`x.py check`| Quick check to see if things compile; [rust-analyzer can run this automatically for you][rust-analyzer]|
199
-
|`x.py build --stage 0 [library/std]`| Build only the standard library, without building the compiler |
200
-
|`x.py build library/std`| Build just the 1st stage of the compiler, along with the standard library; this is faster than building stage 2 and usually good enough |
201
-
|`x.py build --keep-stage 1 library/std`| Build the 1st stage of the compiler and skips rebuilding the standard library; this is useful after you've done an ordinary stage1 build to skip compilation time, but it can cause weird problems. (Just do a regular build to resolve.) |
202
-
|`x.py test [--keep-stage 1]`| Run the test suite using the stage1 compiler |
203
-
|`x.py test --bless [--keep-stage 1]`| Run the test suite using the stage1 compiler _and_ update expected test output. |
204
-
|`x.py build --stage 2 compiler/rustc`| Do a full 2-stage build. You almost never want to do this. |
205
-
|`x.py test --stage 2`| Do a full 2-stage build and run all tests. You almost never want to do this. |
198
+
|`./x.py check`| Quick check to see if things compile; [rust-analyzer can run this automatically for you][rust-analyzer]|
199
+
|`./x.py build --stage 0 [library/std]`| Build only the standard library, without building the compiler |
200
+
|`./x.py build library/std`| Build just the 1st stage of the compiler, along with the standard library; this is faster than building stage 2 and usually good enough |
201
+
|`./x.py build --keep-stage 1 library/std`| Build the 1st stage of the compiler and skips rebuilding the standard library; this is useful after you've done an ordinary stage1 build to skip compilation time, but it can cause weird problems. (Just do a regular build to resolve.) |
202
+
|`./x.py test [--keep-stage 1]`| Run the test suite using the stage1 compiler |
203
+
|`./x.py test --bless [--keep-stage 1]`| Run the test suite using the stage1 compiler _and_ update expected test output. |
204
+
|`./x.py build --stage 2 compiler/rustc`| Do a full 2-stage build. You almost never want to do this. |
205
+
|`./x.py test --stage 2`| Do a full 2-stage build and run all tests. You almost never want to do this. |
206
206
207
207
To do a full 2-stage build of the whole compiler, you should run this (after
208
208
updating `config.toml` as mentioned above):
@@ -231,7 +231,7 @@ For most contributions, you only need to build stage 1, which saves a lot of tim
231
231
```
232
232
233
233
This will take a while, especially the first time. Be wary of accidentally
234
-
touching or formatting the compiler, as `./x.py` will try to recompile it.
234
+
touching or formatting the compiler, as `x.py` will try to recompile it.
235
235
236
236
**NOTE**: The `--keep-stage 1` will _assume_ that the stage 0 standard library
237
237
does not need to be rebuilt, which is usually true, which will save some time.
0 commit comments