Skip to content

Commit 5e30905

Browse files
authored
update x install documentation (rust-lang#2084)
1 parent f6220d0 commit 5e30905

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/doc/rustc-dev-guide/src/building/build-install-distribution-artifacts.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,25 @@ You’ll want to run this command to do it:
77
./x dist
88
```
99

10-
# Install distribution artifacts
10+
# Install from source
1111

12-
If you’ve built a distribution artifact you might want to install it and
13-
test that it works on your target system. You’ll want to run this command:
12+
You might want to prefer installing Rust (and tools configured in your configuration)
13+
by building from source. If so, you want to run this command:
1414

1515
```bash
1616
./x install
1717
```
1818

19-
Note: If you are testing out a modification to a compiler, you
20-
might want to use it to compile some project.
21-
Usually, you do not want to use `./x install` for testing.
22-
Rather, you should create a toolchain as discussed in
23-
[here][create-rustup-toolchain].
19+
Note: If you are testing out a modification to a compiler, you might
20+
want to build the compiler (with `./x build`) then create a toolchain as
21+
discussed in [here][create-rustup-toolchain].
2422

25-
For example, if the toolchain you created is called foo, you
26-
would then invoke it with `rustc +foo ...` (where ... represents
27-
the rest of the arguments).
23+
For example, if the toolchain you created is called "foo", you would then
24+
invoke it with `rustc +foo ...` (where ... represents the rest of the arguments).
2825

29-
[create-rustup-toolchain]: ./how-to-build-and-run.md#creating-a-rustup-toolchain
26+
Instead of installing Rust (and tools in your config file) globally, you can set `DESTDIR`
27+
environment variable to change the installation path. If you want to set installation paths
28+
more dynamically, you should prefer [install options] in your config file to achieve that.
29+
30+
[create-rustup-toolchain]: ./how-to-build-and-run.md#creating-a-rustup-toolchain
31+
[install options]: https://github.com/rust-lang/rust/blob/f7c8928f035370be33463bb7f1cd1aeca2c5f898/config.example.toml#L422-L442

0 commit comments

Comments
 (0)