Commit Graph

8107 Commits

Author SHA1 Message Date
Guillaume Gomez 347dd4741f Rollup merge of #145920 - Zalathar:failure-stdout, r=jieyouxu
bootstrap: Explicitly mark the end of a failed test's captured output

While working on some compiletest stuff, I noticed that when bootstrap prints a failed test's captured output, there's no indication of where that output actually ends.

In addition to indicating where the captured output ends, this end marker also makes it easier to see the relevant test name when scrolling upwards in terminal output.
2025-08-28 21:41:02 +02:00
Zalathar 113aeac44a Remove several remnants of the old libtest-based executor 2025-08-27 23:15:30 +10:00
Zalathar 21de27c88a Explicitly mark the end of a failed test's captured output 2025-08-27 17:44:52 +10:00
Jakub Beránek 6864a5bf42 Use std uplifting more often 2025-08-27 08:01:19 +02:00
Jakub Beránek 41563c7d4a Use compiler_for_std in dist::Std 2025-08-27 07:59:36 +02:00
Jakub Beránek edcdb80914 Add compiler_for_std 2025-08-27 07:59:36 +02:00
Jakub Beránek 31e900b78f Add metadata to dist::JsonDocs 2025-08-27 07:59:36 +02:00
Jakub Beránek c2e5c21223 Add snapshot test for rustc docs 2025-08-27 07:59:33 +02:00
Samuel Tardieu e84b35478b Rollup merge of #145887 - GuillaumeGomez:bootstrap-codegen-backends, r=Kobzol
bootstrap: Don't panic if codegen-backends is set to empty

It fixes a bug we encountered in our last GCC backend sync: https://github.com/rust-lang/rustc_codegen_gcc/actions/runs/17214525469/job/48834700055?pr=753#step:18:595

In short, we used to have in `bootstrap.toml` an empty `rust.codegen-backends = []`, triggering the `unwrap`. We fixed it in https://github.com/rust-lang/rustc_codegen_gcc/pull/753/commits/ad99858fd9056bd29e96898be0f5e01ef527a092.

r? `@Kobzol`
2025-08-26 23:25:04 +02:00
Jakub Beránek 5cf9c130f3 Enable building/disting standard library in stage 0 2025-08-26 22:29:17 +02:00
Guillaume Gomez 2261968711 bootstrap: Make default_codegen_backend return &CodegenBackendKind instead of an Option 2025-08-26 17:13:22 +02:00
Guillaume Gomez 5ce678a7bc bootstrap: error early if any codegen-backends is set to [] 2025-08-26 17:13:09 +02:00
bors 91ee6a4057 Auto merge of #145886 - GuillaumeGomez:rollup-9qv7jhv, r=GuillaumeGomez
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#144373 (remove deprecated Error::description in impls)
 - rust-lang/rust#144551 (Add aarch64_be-unknown-linux-musl target)
 - rust-lang/rust#145076 (Add new Tier-3 target: riscv64a23-unknown-linux-gnu)
 - rust-lang/rust#145481 (Add parentheses for closure when suggesting calling closure)
 - rust-lang/rust#145596 (Losslessly optimize PNG files)
 - rust-lang/rust#145615 (Fix doc of `std::os::windows::io::BorrowedSocket::borrow_raw`)
 - rust-lang/rust#145841 (Always build miri for the host in `x run miri`)
 - rust-lang/rust#145861 (bootstrap: vendor `clippy_test_deps` too)
 - rust-lang/rust#145863 (formatting_options: Make all methods `const`)
 - rust-lang/rust#145867 (cg_llvm: Assert that LLVM range-attribute values don't exceed 128 bits)
 - rust-lang/rust#145875 (Make bootstrap command caching opt-in)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-26 15:11:20 +00:00
Guillaume Gomez 0f30dcc271 Rollup merge of #145875 - Kobzol:bootstrap-caching, r=jieyouxu
Make bootstrap command caching opt-in

It was opt-out before, which was causing some really hard to debug issues.

CC `@Shourya742`

r? `@jieyouxu`
2025-08-26 16:34:18 +02:00
Guillaume Gomez 20a3e452a9 Rollup merge of #145861 - cuviper:vendor-clippy, r=Kobzol
bootstrap: vendor `clippy_test_deps` too

This internal crate explicitly separates itself from the `rustc`
workspace, but it is needed for `./x test clippy` to work, including its
dependencies when building from a vendored `rustc-src` tarball.
2025-08-26 16:34:15 +02:00
Guillaume Gomez 2ac7fddec6 Rollup merge of #145841 - Kobzol:fix-miri-run, r=jieyouxu
Always build miri for the host in `x run miri`

Previously we were building Miri for the passed `--target`, which was wrong.

Fixes: https://github.com/rust-lang/rust/issues/145839

r? `@jieyouxu`
2025-08-26 16:34:14 +02:00
Guillaume Gomez 879bb22092 Rollup merge of #145076 - ZhongyaoChen:feature/add-tier3-riscv64a23-target, r=davidtwco
Add new Tier-3 target: riscv64a23-unknown-linux-gnu

MCP: [Tier 3 target proposal: riscv64a23-unknown-linux-gnu](https://github.com/rust-lang/compiler-team/issues/894)

Changes:

- add new target: riscv64a23-unknown-linux-gnu
- add target page
2025-08-26 16:34:10 +02:00
bors 5ab69249f3 Auto merge of #145874 - Kobzol:fix-dist-builds, r=jieyouxu
Remove unnecessary stage2 host builds from cross-compiled dist builders

This is a repeated regression (https://github.com/rust-lang/rust/issues/138004, https://github.com/rust-lang/rust/issues/138123) that was reintroduced in https://github.com/rust-lang/rust/pull/145472. I thought that we have a test for it, but alas, the "correct" test required `--disable-docs`. I added the test in this PR, and re-added the `dist::Std` build optimization that solves this.

r? `@jieyouxu`
2025-08-26 12:03:52 +00:00
Jakub Beránek 2fd6057c31 Cache LLVM config invocations 2025-08-26 09:21:55 +02:00
Jakub Beránek 7379ff2809 Make bootstrap command caching opt-in
It was too dangerous to cache by default, and was it causing real bugs.
2025-08-26 09:21:55 +02:00
Jakub Beránek c7f90c117e Do not unnecessarily build stage2 host rustc in some dist builders 2025-08-26 09:20:10 +02:00
Jakub Beránek 598387bfb5 Add snapshot test for cross-compiled dist without docs 2025-08-26 08:52:04 +02:00
Jakub Beránek 0781c47acf Always build miri for the host in x run miri 2025-08-26 08:05:28 +02:00
Stuart Cook d19663951f Rollup merge of #145845 - Kobzol:fix-distcheck, r=jieyouxu
Make `x test distcheck` self-contained

Before, the checked components were extracted under the checked out source root, which caused us to test some weird combination of tarball + checkout sources/aritfacts/configuration.

Now `x test distcheck` works with an external temporary directory instead, which should make it self-contained. I also moved some config from the Dockerfile to the test itself, and fixed an issue in tidy that caused `x test tidy` to fail on tarball sources.

I also removed `.args(&builder.config.configure_args)`, because it was passing all kinds of crap from the CI config to the distcheck step, which was making it less reproducible.

Fixes: https://github.com/rust-lang/rust/issues/145183

r? ```@jieyouxu```

try-job: x86_64-gnu-distcheck
2025-08-26 14:19:20 +10:00
Josh Stone c73d7ae1c6 bootstrap: vendor clippy_test_deps too
This internal crate explicitly separates itself from the `rustc`
workspace, but it is needed for `./x test clippy` to work, including its
dependencies when building from a vendored `rustc-src` tarball.
2025-08-25 15:14:13 -07:00
Paul Murphy 148a07cbd0 Refactor *.optimized-compiler-builtins bootstrap options
Create a dedicated enum to abstract the different ways compiler-builtins
can be configured.

This also relaxes build.optimized-compiler-builtins to accept the path
of a library to match the behavior of <target>.optimized-compiler-builtins
override.
2025-08-25 16:08:36 -05:00
Paul Murphy 64cbe52849 Allow linking a prebuilt optimized compiler-rt builtins library
Extend the <target>.optimized-compiler-builtins bootstrap option to accept a
path to a prebuilt compiler-rt builtins library, and update compiler-builtins
to enable optimized builtins without building compiler-rt builtins.
2025-08-25 16:08:35 -05:00
bors 54c581243c Auto merge of #145472 - Kobzol:bootstrap-dist, r=jieyouxu
Enforce in bootstrap that dist and install must have stage at least 1

This is a continuation of my efforts to fix staging in bootstrap after the stage0 redesign. This PR gets rid of all `compiler_for` usages in the `dist` steps 🎉 The only remaining usages are in the `test` steps, which are my next goal, and which will be the final boss.. both because they are quite tricky, and because most of the the rest of the steps have been already fixed.

The changes are relatively straightforward, `x dist` defaults to stage 2, so in that case we want to use a stage 1 build compiler for everything (except stdlib, but we usually use it even there because of uplifting).

What I didn't fix yet are the docs steps, because they are *very* implicit right now, and fixing them deserves its own PR.

The first commit reverts the tests that I accidentally removed in https://github.com/rust-lang/rust/pull/145340 🤦‍♂️ I did it in this PR to avoid further git conflicts..

Best reviewed commit-by-commit.

r? `@jieyouxu`

try-job: dist-i686-linux
try-job: dist-armhf-linux
try-job: dist-x86_64-linux
try-job: dist-x86_64-msvc
try-job: dist-apple-various
try-job: dist-x86_64-apple
try-job: x86_64-msvc-2
2025-08-25 16:17:56 +00:00
Jakub Beránek 2ea8621779 Override GITHUB_ACTIONS=0 for tidy tests 2025-08-25 14:10:44 +02:00
Jakub Beránek 8fa5fc63ba Do not forward CI configure arguments to distcheck builds 2025-08-25 12:32:13 +02:00
Jakub Beránek a3229e4101 Make x test distcheck more self-contained 2025-08-25 12:03:44 +02:00
Stuart Cook d89d8a7909 Rollup merge of #145794 - he32:bootstrap-netbsd-fix, r=Kobzol
bootstrap.py: Improve CPU detection on NetBSD

...and add some adaptation of detection for some arm variants.
2025-08-25 19:52:21 +10:00
Havard Eidnes 2f1b6d19f1 bootstrap.py: follow up more 'tidy' insistence (string quotes). 2025-08-24 09:39:33 +00:00
Havard Eidnes 3a2392bb08 bootstrap.py: follow up tidy output from CI.
I thought tidy would be more allergic to 80-coloumn overflow,
but so be it.
2025-08-23 21:40:19 +00:00
Samuel Tardieu 608271f764 Rollup merge of #145774 - Shourya742:2025-08-23-remove-default-opts-method, r=Kobzol
Remove default opts from config

We forgot to remove this method in https://github.com/rust-lang/rust/pull/145352. This PR removes that.

r? ```@Kobzol```
2025-08-23 22:22:20 +02:00
Havard Eidnes 45bcbd99a5 bootstrap.py: Improve CPU detection on NetBSD,
...and add adaptation of detection for some arm variants.
2025-08-23 19:15:46 +00:00
Jakub Beránek 412734de29 Allow running rust-installer (and other tools) multiple times with the same arguments 2025-08-23 14:18:30 +02:00
Jakub Beránek 600d9bf149 Use correct mode when printing a build message for std documentation 2025-08-23 14:17:51 +02:00
Jakub Beránek a62488bb27 Handle uplifting in libstd dist step 2025-08-23 11:17:35 +02:00
Jakub Beránek 21c30eac49 Fix install test on Windows 2025-08-23 11:00:32 +02:00
Jakub Beránek 0470945ec8 Remove the x dist rust-std built optimization special-case 2025-08-23 11:00:32 +02:00
Jakub Beránek 3303770847 Don't try to cross-document bootstrap tools 2025-08-23 11:00:32 +02:00
Jakub Beránek ba1bc64325 Fix doc link 2025-08-23 11:00:32 +02:00
Jakub Beránek 0579f055cd Add change tracker entry 2025-08-23 11:00:31 +02:00
Jakub Beránek 3ec2abc2f4 Fix staging in x install 2025-08-23 11:00:31 +02:00
Jakub Beránek 2074e1344d Forbid running install steps on stage 0 2025-08-23 11:00:31 +02:00
Jakub Beránek e8af2365c0 Cleanup the last few dist steps 2025-08-23 11:00:31 +02:00
Jakub Beránek 699e5fe933 Cleanup dist::Bootstrap and add a simple test for it 2025-08-23 11:00:31 +02:00
Jakub Beránek e68c93b538 Remove compiler_for from dist::Extended 2025-08-23 11:00:31 +02:00
Jakub Beránek 887831fb7f Remove compiler_for from dist::Rustfmt 2025-08-23 11:00:31 +02:00