Commit 5ba3bfc
authored
Rollup merge of #145876 - Kobzol:dist-std-build, r=jieyouxu
Enable building/disting standard library in stage 0
After the stage0 redesign, building a stage0 library no longer is a thing, because the stage0 compiler normally cannot build libstd anymore. However, there are valid use-cases for having the ability to quickly cross-compile libstd for different targets, when the stage0 compiler is e.g. a stable released version, and you want to cross-compile libstd from the same sources of that compiler.
This PR allows that, as long as you set `build.local-rebuild = true`, which promises bootstrap that the stage0 compiler actually comes from in-tree sources, and can thus compile libstd.
The change needed to enable this is very minimal, so I think that it is worth it to allow this use-case to work.
Fixes: #145587
Fixes: #145859
Related issue: #94781
r? `@jieyouxu`File tree
5 files changed
+79
-26
lines changed- src/bootstrap/src
- core
- build_steps
- builder
- config
- utils
5 files changed
+79
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1435 | 1435 | | |
1436 | 1436 | | |
1437 | 1437 | | |
1438 | | - | |
1439 | | - | |
| 1438 | + | |
| 1439 | + | |
1440 | 1440 | | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
1441 | 1444 | | |
1442 | 1445 | | |
1443 | | - | |
1444 | | - | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
1445 | 1451 | | |
| 1452 | + | |
1446 | 1453 | | |
1447 | | - | |
1448 | | - | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
1449 | 1461 | | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | 1462 | | |
1455 | 1463 | | |
1456 | 1464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
856 | 868 | | |
857 | 869 | | |
858 | 870 | | |
| |||
1696 | 1708 | | |
1697 | 1709 | | |
1698 | 1710 | | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
1699 | 1727 | | |
1700 | 1728 | | |
1701 | 1729 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
972 | | - | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
973 | 986 | | |
974 | 987 | | |
975 | | - | |
976 | | - | |
| 988 | + | |
977 | 989 | | |
978 | 990 | | |
979 | | - | |
980 | | - | |
| 991 | + | |
981 | 992 | | |
982 | 993 | | |
983 | | - | |
984 | | - | |
| 994 | + | |
985 | 995 | | |
986 | 996 | | |
987 | | - | |
988 | | - | |
| 997 | + | |
989 | 998 | | |
990 | 999 | | |
991 | | - | |
992 | | - | |
| 1000 | + | |
993 | 1001 | | |
994 | 1002 | | |
995 | | - | |
996 | | - | |
| 1003 | + | |
997 | 1004 | | |
998 | 1005 | | |
999 | 1006 | | |
| |||
1234 | 1241 | | |
1235 | 1242 | | |
1236 | 1243 | | |
1237 | | - | |
| 1244 | + | |
1238 | 1245 | | |
1239 | 1246 | | |
1240 | 1247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
529 | 534 | | |
0 commit comments