This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit bb2cc59
committed
Auto merge of rust-lang#137215 - onur-ozkan:rustc-tool-build-stages, r=jieyouxu,Kobzol
stabilize stage management for rustc tools
rust-lang#135990 got out of control due to excessive complexity. This PR aims to achieve the same goal with a simpler approach, likely through multiple smaller PRs. I will keep the other one read-only and open as a reference for future work.
This work stabilizes the staging logic for `ToolRustc` programs, so you no longer need to handle build and target compilers separately in steps. Previously, most tools didn't do this correctly, which was causing the compiler to be built twice (e.g., `x test cargo --stage 1` would compile the stage 2 compiler before, but now it only compiles the stage 1 compiler).
I also tried to document how we should write `ToolRustc` steps as they are quite different and require more attention than other tools.
Next goal is to stabilize how stages are handled for the rustc itself. Currently, `x build --stage 1` builds the stage 1 compiler which is fine, but `x build compiler --stage 1` builds stage 2 compiler.
~~for now, r? ghost~~File tree
12 files changed
+340
-263
lines changed- src
- bootstrap
- defaults
- src
- core
- build_steps
- builder
- utils
- doc/rustc-dev-guide/src
- building/bootstrapping
12 files changed
+340
-263
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1983 | 1983 | | |
1984 | 1984 | | |
1985 | 1985 | | |
1986 | | - | |
1987 | | - | |
1988 | | - | |
1989 | | - | |
1990 | | - | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1991 | 1992 | | |
1992 | | - | |
| 1993 | + | |
1993 | 1994 | | |
1994 | 1995 | | |
1995 | 1996 | | |
| |||
2181 | 2182 | | |
2182 | 2183 | | |
2183 | 2184 | | |
2184 | | - | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
2189 | 2189 | | |
2190 | | - | |
2191 | | - | |
| 2190 | + | |
| 2191 | + | |
2192 | 2192 | | |
2193 | 2193 | | |
2194 | 2194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
| 433 | + | |
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| |||
1145 | 1145 | | |
1146 | 1146 | | |
1147 | 1147 | | |
1148 | | - | |
| 1148 | + | |
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
| |||
1191 | 1191 | | |
1192 | 1192 | | |
1193 | 1193 | | |
1194 | | - | |
| 1194 | + | |
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
| |||
1233 | 1233 | | |
1234 | 1234 | | |
1235 | 1235 | | |
1236 | | - | |
| 1236 | + | |
1237 | 1237 | | |
1238 | 1238 | | |
1239 | 1239 | | |
| |||
1279 | 1279 | | |
1280 | 1280 | | |
1281 | 1281 | | |
1282 | | - | |
1283 | | - | |
| 1282 | + | |
| 1283 | + | |
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
1332 | | - | |
1333 | | - | |
| 1332 | + | |
| 1333 | + | |
1334 | 1334 | | |
1335 | 1335 | | |
1336 | 1336 | | |
| |||
1460 | 1460 | | |
1461 | 1461 | | |
1462 | 1462 | | |
1463 | | - | |
1464 | | - | |
| 1463 | + | |
| 1464 | + | |
1465 | 1465 | | |
1466 | 1466 | | |
1467 | 1467 | | |
| |||
2283 | 2283 | | |
2284 | 2284 | | |
2285 | 2285 | | |
2286 | | - | |
| 2286 | + | |
2287 | 2287 | | |
2288 | 2288 | | |
2289 | 2289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 129 | + | |
134 | 130 | | |
135 | 131 | | |
136 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
301 | 306 | | |
302 | 307 | | |
303 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
304 | 311 | | |
305 | 312 | | |
306 | 313 | | |
| |||
367 | 374 | | |
368 | 375 | | |
369 | 376 | | |
| 377 | + | |
370 | 378 | | |
371 | 379 | | |
372 | 380 | | |
| |||
427 | 435 | | |
428 | 436 | | |
429 | 437 | | |
430 | | - | |
| 438 | + | |
| 439 | + | |
431 | 440 | | |
432 | 441 | | |
433 | 442 | | |
| |||
522 | 531 | | |
523 | 532 | | |
524 | 533 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | 534 | | |
531 | 535 | | |
532 | | - | |
| 536 | + | |
533 | 537 | | |
534 | | - | |
| 538 | + | |
535 | 539 | | |
536 | 540 | | |
537 | 541 | | |
| |||
542 | 546 | | |
543 | 547 | | |
544 | 548 | | |
545 | | - | |
| 549 | + | |
| 550 | + | |
546 | 551 | | |
547 | 552 | | |
548 | 553 | | |
| |||
553 | 558 | | |
554 | 559 | | |
555 | 560 | | |
556 | | - | |
| 561 | + | |
557 | 562 | | |
558 | 563 | | |
559 | 564 | | |
| |||
571 | 576 | | |
572 | 577 | | |
573 | 578 | | |
574 | | - | |
| 579 | + | |
575 | 580 | | |
576 | 581 | | |
577 | 582 | | |
| |||
743 | 748 | | |
744 | 749 | | |
745 | 750 | | |
746 | | - | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
747 | 758 | | |
748 | 759 | | |
749 | 760 | | |
| |||
1728 | 1739 | | |
1729 | 1740 | | |
1730 | 1741 | | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
| 1742 | + | |
1743 | 1743 | | |
1744 | 1744 | | |
1745 | 1745 | | |
| |||
1760 | 1760 | | |
1761 | 1761 | | |
1762 | 1762 | | |
1763 | | - | |
1764 | | - | |
1765 | | - | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
1766 | 1767 | | |
1767 | 1768 | | |
1768 | 1769 | | |
| |||
2999 | 3000 | | |
3000 | 3001 | | |
3001 | 3002 | | |
3002 | | - | |
| 3003 | + | |
3003 | 3004 | | |
3004 | 3005 | | |
3005 | 3006 | | |
3006 | 3007 | | |
3007 | | - | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
3008 | 3012 | | |
3009 | 3013 | | |
3010 | 3014 | | |
| |||
0 commit comments