Skip to content

Commit 51fc2ec

Browse files
committed
Move information about dependencies to the rust-lang/rust readme
This avoids having to maintain the information in two places.
1 parent f111b88 commit 51fc2ec

File tree

2 files changed

+3
-50
lines changed

2 files changed

+3
-50
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The compiler is built using a tool called `x.py`. You will need to
44
have Python installed to run it.
55

66
For instructions on how to install Python and other prerequisites,
7-
see [the next page](./prerequisites.md).
7+
see [the `rust-lang/rust` README][readme].
88

99
## Get the source code
1010

@@ -13,6 +13,7 @@ the standard library (including `core`, `alloc`, `test`, `proc_macro`, etc),
1313
and a bunch of tools (e.g. `rustdoc`, the bootstrapping infrastructure, etc).
1414

1515
[repo]: https://github.com/rust-lang/rust
16+
[readme]: https://github.com/rust-lang/rust#building-on-a-unix-like-system
1617

1718
The very first step to work on `rustc` is to clone the repository:
1819

src/building/prerequisites.md

+1-49
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,7 @@
22

33
## Dependencies
44

5-
Before building the compiler, you need the following things installed:
6-
7-
* `python` 3 or 2.7 (under the name `python`; `python2` or `python3` will not work)
8-
* `curl`
9-
* `git`
10-
* `ssl` which comes in `libssl-dev` or `openssl-devel`
11-
* `pkg-config` if you are compiling on Linux and targeting Linux
12-
* `libstdc++-static` may be required on some Linux distributions such as Fedora and Ubuntu
13-
14-
If building LLVM from source (the default), you'll need additional tools:
15-
16-
* `g++`, `clang++`, or MSVC with versions listed on <!-- date-check: Aug 2022 -->
17-
[LLVM's documentation](https://releases.llvm.org/13.0.0/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library)
18-
* `ninja`, or GNU `make` 3.81 or later (ninja is recommended, especially on Windows)
19-
* `cmake` 3.13.4 or later
20-
21-
Otherwise, you'll need LLVM installed and `llvm-config` in your path.
22-
See [this section for more info][sysllvm].
23-
24-
[sysllvm]: ./new-target.md#using-pre-built-llvm
25-
26-
### Windows
27-
28-
* Install [winget](https://github.com/microsoft/winget-cli)
29-
30-
`winget` is a Windows package manager. It will make package installation easy
31-
on Windows.
32-
33-
Run the following in a terminal:
34-
35-
```powershell
36-
winget install -e Python.Python.3
37-
winget install -e Kitware.CMake
38-
```
39-
40-
If any of those is installed already, winget will detect it. Then edit your system's `PATH` variable
41-
and add: `C:\Program Files\CMake\bin`. See
42-
[this guide on editing the system `PATH`](https://www.java.com/en/download/help/path.html) from the
43-
Java documentation.
44-
45-
For more information about building on Windows,
46-
see [the `rust-lang/rust` README](https://github.com/rust-lang/rust#building-on-windows).
5+
See [the `rust-lang/rust` README](https://github.com/rust-lang/rust#dependencies).
476

487
## Hardware
498

@@ -80,10 +39,3 @@ longer (especially after a rebase), but will save a ton of space from the
8039
incremental caches.
8140

8241
[config]: ./how-to-build-and-run.md#create-a-configtoml
83-
84-
## `rustc` and toolchain installation
85-
86-
Follow the installation given in the [Rust book][install] to install a working
87-
`rustc` and the necessary C/++ toolchain on your platform.
88-
89-
[install]: https://doc.rust-lang.org/book/ch01-01-installation.html

0 commit comments

Comments
 (0)