This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 347452e
committed
Auto merge of rust-lang#116196 - onur-ozkan:reorganize-bootstrap-sources, r=Mark-Simulacrum
reorganize/refactor bootstrap codebase
Currently, bootstrap stores everything on the root path, including very large modules, which makes things very hard to scale and adds too much complexity.
This PR has the following objectives:
- Improving scalability.
- Making bootstrap source more understandable for the new contributors(or for everyone).
- Improving the development experience and making maintenance easier for the bootstrap team.
The new source structure:
```
.
├── defaults
│ ├── README.md
│ ├── config.codegen.toml
│ ├── config.compiler.toml
│ ├── config.dist.toml
│ ├── config.library.toml
│ └── config.tools.toml
├── mk
│ └── Makefile.in
├── src
│ ├── bin
│ │ ├── main.rs
│ │ ├── rustc.rs
│ │ ├── rustdoc.rs
│ │ └── sccache-plus-cl.rs
│ ├── core
│ │ ├── build_steps
│ │ │ ├── check.rs
│ │ │ ├── clean.rs
│ │ │ ├── compile.rs
│ │ │ ├── dist.rs
│ │ │ ├── doc.rs
│ │ │ ├── format.rs
│ │ │ ├── install.rs
│ │ │ ├── llvm.rs
│ │ │ ├── mod.rs
│ │ │ ├── run.rs
│ │ │ ├── setup.rs
│ │ │ ├── suggest.rs
│ │ │ ├── synthetic_targets.rs
│ │ │ ├── test.rs
│ │ │ ├── tool.rs
│ │ │ └── toolstate.rs
│ │ ├── config
│ │ │ ├── config.rs
│ │ │ ├── flags.rs
│ │ │ └── mod.rs
│ │ ├── builder.rs
│ │ ├── download.rs
│ │ ├── metadata.rs
│ │ ├── mod.rs
│ │ └── sanity.rs
│ ├── tests
│ │ ├── builder.rs
│ │ ├── config.rs
│ │ └── setup.rs
│ ├── utils
│ │ ├── bin_helpers.rs
│ │ ├── cache.rs
│ │ ├── cc_detect.rs
│ │ ├── channel.rs
│ │ ├── dylib.rs
│ │ ├── helpers.rs
│ │ ├── job.rs
│ │ ├── metrics.rs
│ │ ├── mod.rs
│ │ ├── render_tests.rs
│ │ └── tarball.rs
│ └── lib.rs
├── Cargo.lock
├── Cargo.toml
├── README.md
├── bootstrap.py
├── bootstrap_test.py
├── build.rs
├── configure.py
└── download-ci-llvm-stamp
```
The next step involves:
- Adding more doc-comments to the bootstrap internals (although we already have a decent amount, there is space for improvement).
- Breaking large modules into smaller, more manageable modules.
- Significantly increasing our unit test coverage (which is currently lacking).
This PR should serve as an initial step to make the tasks above much more easier.
r? Mark-SimulacrumFile tree
45 files changed
+530
-508
lines changed- src/bootstrap
- src
- bin
- core
- build_steps
- config
- tests
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
45 files changed
+530
-508
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
This file was deleted.
File renamed without changes.
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 18 | | |
22 | 19 | | |
23 | | - | |
| 20 | + | |
24 | 21 | | |
25 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
30 | | - | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | | - | |
18 | | - | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
File renamed without changes.
Lines changed: 12 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
196 | | - | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
240 | | - | |
241 | | - | |
| 242 | + | |
| 243 | + | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| |||
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
390 | | - | |
| 392 | + | |
391 | 393 | | |
392 | 394 | | |
393 | 395 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 15 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
510 | 511 | | |
511 | 512 | | |
512 | 513 | | |
513 | | - | |
| 514 | + | |
514 | 515 | | |
515 | 516 | | |
516 | 517 | | |
| |||
1016 | 1017 | | |
1017 | 1018 | | |
1018 | 1019 | | |
1019 | | - | |
| 1020 | + | |
| 1021 | + | |
1020 | 1022 | | |
1021 | 1023 | | |
1022 | 1024 | | |
| |||
1684 | 1686 | | |
1685 | 1687 | | |
1686 | 1688 | | |
1687 | | - | |
| 1689 | + | |
1688 | 1690 | | |
1689 | 1691 | | |
1690 | 1692 | | |
| |||
0 commit comments