about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-08-07Rollup merge of #144473 - zeroomega:rustc_inconsistency, r=Mark-SimulacrumStuart Cook-5/+13
Address libunwind.a inconsistency issues in the bootstrap program We noticed when building rustc multiple time in a roll, some files will not be consistent across the build despite the fact that they are built from same source under the same environment. This patch addresses the inconsistency issue we found on libunwind.a, by sorting the order of the files passed to the linker.
2025-08-06tidyBoxy-12/+2
2025-08-06Fix build/doc/test of error index generatorJakub Beránek-87/+124
It is essentially a RustcPrivate tool, so it should be treated as such using the new `RustcPrivateCompilers` infra.
2025-08-06Remove unneeded `stage` parameter when setting up stdlib CargoJakub Beránek-13/+9
2025-08-06handle bootstrap cfgsBoxy-34/+12
2025-08-06remove redundant _toml suffix and other misc changesbit-aloo-389/+371
2025-08-05Auto merge of #144303 - Kobzol:bootstrap-tool-cleanup, r=jieyouxubors-453/+744
Consolidate staging for `rustc_private` tools This PR continues bootstrap refactoring, this time by consolidating staging for `Mode::ToolRustc` tools. This refactoring was in the critical path of refactoring `test`/`dist`/`clippy`/`doc` steps, and getting rid of the rmeta/rlib sysroot copy, because tools are pervasive and they are being used for a lot of things in bootstrap. The main idea is to explicitly model the fact that a stage N `Mode::ToolRustc` tool always works with two different compilers: - Stage N-1 rustc (`build_compiler`) builds stage N rustc (`target_compiler`) - Rlib artifacts from stage N rustc are copied to the sysroot of stage N-1 rustc - Stage N-1 rustc builds the (stage N) tool itself, the tool links to the rlib artifacts of the stage N rustc Before, the code often used `compiler`, which meant sometimes the build compiler, sometimes the target compiler, and sometimes neither (looking at you, `download-rustc`). This is especially annoying when you get to a situation where you have an install step that invokes a dist step that invokes a tool build step, where *some* compiler is being propagated through, without it being clear what does that compiler represent. This refactoring hopefully makes that clearer and more explicit. It also gets rid of a few `builder.ensure(Rustc(...))` calls within bootstrap, which is always nice. `Rustdoc` needs to be handled a bit specially, because it acts as a compiler itself, I documented that in the changes. It wasn't practical to do these refactorings in multiple PRs, so I did it all in one PR. The meat of the change is 9ee6d1c1ed112c3dcfb5684b33772b136df0dca3. I tested manually that `x build rustdoc` and `x build miri` still works even with `download-rustc`, although I cannot promise any extra support for `download-rustc`, IMO we will just have to reimplement it from scratch in a different way. As usually, I did some drive-by refactorings to bootstrap, trying to document and clarify things, add more step metadata and tests. Since these changes broke Cargo, which was incorrectly using `Mode::ToolRustc`, I also changed cargo to `ToolTarget` in this PR. Best reviewed commit-by-commit (note that I renamed `link_compiler` to `target_compiler`, in accordance to the rest of bootstrap, in the last commit). r? `@jieyouxu` try-job: x86_64-gnu-aux try-job: x86_64-msvc-ext1
2025-08-04windows-gnullvm: include `libunwind.dll` in distMateusz Mikuła-7/+24
2025-08-04Fix splitting dylib pathsJakub Beránek-10/+8
2025-08-04Do not render both cached and uncached edge between two stepsJakub Beránek-1/+7
2025-08-04Implement debugging output of the bootstrap Step graph into a DOT fileJakub Beránek-2/+217
2025-08-03For "stage 1" ui-fulldeps, use the stage 1 compiler to query target infoZalathar-0/+8
Testing ui-fulldeps in "stage 1" actually uses the stage 0 compiler, so that test programs can link against stage 1 rustc crates. Unfortunately, using the stage 0 compiler causes problems when compiletest tries to obtain target information from the compiler, but the output format has changed since the last bootstrap beta bump. We can work around this by also providing compiletest with a stage 1 compiler, and having it use that compiler to query for target information.
2025-08-02Rollup merge of #144782 - jieyouxu:compiletest-selftests, r=KobzolSamuel Tardieu-0/+6
Properly pass path to staged `rustc` to `compiletest` self-tests Otherwise, this can do weird things like use a global rustc, or try to use stage 0 rustc. This must be properly configured, because `compiletest` is intended to only support one compiler target spec JSON format (of the in-tree compiler). Historically, this was probably done so before `bootstrap` was really its own thing, and `compiletest` had to be runnable as a much more "self-standing" tool. Follow-up to rust-lang/rust#144675, as I didn't realize this until Zalathar pointed it out in [#t-infra/bootstrap > Building vs testing `compiletest` @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Building.20vs.20testing.20.60compiletest.60/near/532040838). r? ````@Kobzol````
2025-08-01move dist and gcc config to the top of parse methodbit-aloo-12/+12
2025-08-01move llvm config to the top of parse methodbit-aloo-31/+36
2025-08-01move rust config to the top of parse methodbit-aloo-59/+58
2025-08-01move install config to the top of parse methodbit-aloo-12/+15
2025-08-01move build config to the top of parse methodbit-aloo-12/+13
2025-08-01make build toml fields follow a specific naming conventionbit-aloo-125/+120
2025-08-01make install toml fields follow a specific naming conventionbit-aloo-14/+14
2025-08-01make dist toml fields follow a specific naming conventionbit-aloo-14/+14
2025-08-01make gcc toml fields follow a specific naming conventionbit-aloo-2/+2
2025-08-01make llvm toml fields follow a specific naming conventionbit-aloo-59/+59
2025-08-01add rust default implementationbit-aloo-200/+175
2025-08-01add llvm default implementationbit-aloo-111/+97
2025-08-01add gcc and dist default implementationbit-aloo-32/+32
2025-08-01add install default implementationbit-aloo-10/+26
2025-08-01Fix verbosity settingbit-aloo-8/+10
2025-08-01Fix logging of config skip valuesbit-aloo-28/+27
2025-08-01Override some build TOML values by flagsbit-aloo-127/+149
2025-08-01Split TOML postprocessing into a separate functionbit-aloo-99/+114
2025-08-01Extract TOML config loading and src directory computation into separate ↵bit-aloo-89/+117
functions
2025-08-01Force initializing ExecutionContext with verbosity and fail_fast modebit-aloo-8/+6
2025-08-01move rust config to parse_innerbit-aloo-261/+251
2025-08-01move llvm parsing to parse_innerbit-aloo-127/+123
2025-08-01move install to parse_innerbit-aloo-20/+13
2025-08-01move target parsing to parse_innerbit-aloo-71/+64
2025-08-01move dist to parse_innerbit-aloo-31/+25
2025-08-01move gcc config parsing to parse_innerbit-aloo-19/+11
2025-08-01Clarify comments on Cargo (self-)test stepsJakub Beránek-4/+14
2025-08-01Make `x test cargo` stage N test rustc stage NJakub Beránek-13/+47
2025-08-01Fix `x test cargo`Jakub Beránek-36/+31
2025-08-01Make build compiler explicit in `dist::Cargo`Jakub Beránek-16/+25
2025-08-01Add snapshot tests for `test cargo` and update Cargo snapshot testsJakub Beránek-2/+35
2025-08-01Update `CargoTest`Jakub Beránek-9/+39
2025-08-01Make `Cargo` a `ToolTarget` toolJakub Beránek-12/+4
2025-08-01Add basic Cargo snapshot testJakub Beránek-0/+15
2025-08-01Appease ClippyJakub Beránek-1/+0
2025-08-01Rename `link_compiler` to `target_compiler`Jakub Beránek-27/+30
2025-08-01Port codegen backends to `RustcPrivateCompilers`Jakub Beránek-61/+45