Commit graph

7477 commits

Author SHA1 Message Date
bjorn3
10bec8f7de Add change_tracker.rs entry 2025-07-12 12:37:03 +00:00
bjorn3
ccc302baa0 Move --compile-time-deps 2025-07-12 12:34:37 +00:00
bjorn3
ae1075b9ee Update description for flag 2025-07-11 13:54:44 +00:00
bjorn3
87958ad683 Avoid building C++ for rustc_llvm with --compile-time-deps
This saves about 30s.
2025-07-11 13:32:03 +00:00
bjorn3
3fe3edbcde Add --compile-time-deps argument for x check
This reduces the amount of time it takes to do the x check for
rust-analyzer analysis from 12m16s to 3m34s when the bootstrap compiler
is already downloaded.
2025-07-11 12:34:17 +00:00
Trevor Gross
d1a57676ef
Rollup merge of #143707 - Kobzol:bootstrap-std-check, r=jieyouxu
Fix `--skip-std-check-if-no-download-rustc`

Since https://github.com/rust-lang/rust/pull/143048, we now explicitly set the build compiler for `check::Std`, which caused it to be built before we checked `--skip-std-check-if-no-download-rustc`. So I moved the check earlier to `make_run`, which resolves it.

I also added a regression test for this. Sadly we can't really test for the positive case easily (when download-ci-rustc is enabled), but we can test the negative cases, where it is disabled.

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

r? ```@RalfJung```
2025-07-10 20:20:39 -04:00
bors
2a023bf80a Auto merge of #143746 - matthiaskrgr:rollup-yaojj7t, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#143446 (use `--dynamic-list` for exporting executable symbols)
 - rust-lang/rust#143590 (Fix weird rustdoc output when single and glob reexport conflict on a name)
 - rust-lang/rust#143599 (emit `.att_syntax` when global/naked asm use that option)
 - rust-lang/rust#143615 (Fix handling of no_std targets in `doc::Std` step)
 - rust-lang/rust#143632 (fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations)
 - rust-lang/rust#143640 (Constify `Fn*` traits)
 - rust-lang/rust#143651 (Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic)
 - rust-lang/rust#143660 (Disable docs for `compiler-builtins` and `sysroot`)
 - rust-lang/rust#143665 ([rustdoc-json] Add tests for `#[doc(hidden)]` handling of items.)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-10 19:56:08 +00:00
Matthias Krüger
6c4502d97d
Rollup merge of #143660 - cuviper:lib-doc-false, r=tgross35
Disable docs for `compiler-builtins` and `sysroot`

Bootstrap already had a manual doc filter for the `sysroot` crate, but
other library crates keep themselves out of the public docs by setting
`[lib] doc = false` in their manifest. This seems like a better solution
to hide `compiler-builtins` docs, and removes the `sysroot` hack too.

Fixes rust-lang/rust#143215 (after backport)
```@rustbot``` label beta-nominated
2025-07-10 20:28:50 +02:00
Matthias Krüger
55a57fcbac
Rollup merge of #143615 - Kobzol:doc-std, r=jieyouxu
Fix handling of no_std targets in `doc::Std` step

The previous logic was wrong for no_std targets, it just didn't do anything. The logic was added there because by default, the `Std` step would otherwise have a list of all std crates to check, but these would fail for no_std targets. What has to happen instead is to select the default set of packages to check/doc/build, which currently happens in the `std_cargo` function, but the `self.crates` list was overriding that.

In general, using `crates: Vec<String>` in the `Std` steps is quite fishy, because it's difficult to distinguish between all crates (either they are all enumerated or `crates` is empty) and the default (e.g. `x <kind> [library]`) vs a subset (e.g. `x <kind> core`). I wanted to improve that using an enum that would distinguish these situations, avoid passing `-p` for all of the crates explicitly, and unify the selection of packages to compile/check/... in `std_cargo`, based on this enum.

However, I found out from some other bootstrap comments that when you pass `-p` explicitly for all crates, cargo behaves differently (apparently for check it will also check targets/examples etc. with `-p`, but not without it). Furthermore, the doc step has a special case where it does not document the `sysroot` package. So as usually, unifying this logic would get into some edge cases... So instead I opted for a seemingly simpler solution, where I try to prefilter only two allowed crates (core and alloc) for no_std targets in the `std_crates_for_run_make` function.

It's not perfect, but I think it's better than the status quo (words to live by when working on bootstrap...).

Fixes [this Zulip topic](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/docs.20for.20non-host.20targets.3F).

r? `@jieyouxu`
2025-07-10 20:28:48 +02:00
bors
a9f2aad045 Auto merge of #143525 - Shourya742:2025-07-06-add-profiler, r=Kobzol
Add profiler to bootstrap command

This PR adds command profiling to the bootstrap command. It tracks the total execution time and records cache hits for each command. It also provides the ability to export execution result to a JSON file. Integrating this with Chrome tracing could further enhance observability.

r? `@Kobzol`
2025-07-10 16:51:58 +00:00
bit-aloo
eac1ed5b74
enable report summary when BOOTSTRAP_PROFILE is set 2025-07-10 18:25:43 +05:30
bit-aloo
75b454b320
expose report summary via build 2025-07-10 18:25:43 +05:30
bit-aloo
13c31d445e
update streaming to record its execution via commandprofiler 2025-07-10 18:25:42 +05:30
bit-aloo
5e0c197828
add commandProfiler to bootstrap execution context 2025-07-10 18:25:42 +05:30
bit-aloo
f5c73a14ff
change cachekey to CommandFingerprint and change related API's and add start time to deferred execution 2025-07-10 18:25:42 +05:30
Trevor Gross
58ec9db538
Rollup merge of #143398 - lolbinarycat:tidy-extra-checks-auto, r=Kobzol
tidy: add support for `--extra-checks=auto:` feature

in preparation for rust-lang/rust#142924

also heavily refactored the parsing of the `--extra-checks` argument to warn about improper usage.

cc ```@GuillaumeGomez```

r? ```@Kobzol```
2025-07-10 03:23:57 -04:00
Jakub Beránek
3e675f4c50
Fix --skip-std-check-if-no-download-rustc
Since https://github.com/rust-lang/rust/pull/143048, we now explicitly set the build compiler for `check::Std`, which caused it to be built before we checked `--skip-std-check-if-no-download-rustc`. So I moved the check earlier to `make_run`, which resolves it.

I also added a regression test for this. Sadly we can't really test for the positive case easily (when download-ci-rustc is enabled), but we can test the negative cases, where it is disabled.
2025-07-10 08:20:22 +02:00
Jakub Beránek
6c38d389f2
Add doc cross-compilation test 2025-07-09 10:26:36 +02:00
Jakub Beránek
566dc98d2a
Add doc library test for a no_std target 2025-07-09 09:47:37 +02:00
Trevor Gross
45b63a4297
Rollup merge of #143606 - lambdageek:configure-write-last-key, r=Kobzol
configure.py: Write last key in each section

The loop that writes the keys in each section of bootstrap.toml accumulates all the commented lines before a given key and emits them when it reaches the next key in the section.  This ends up dropping lines accumulated for the last key

Fixes rust-lang/rust#143605
2025-07-08 22:50:30 -05:00
Trevor Gross
d069a7cf14
Rollup merge of #142357 - Kobzol:simplify-llvm-bitcode-linker, r=jieyouxu
Simplify LLVM bitcode linker in bootstrap and add tests for it

This PR tries to simplify the `LlvmBitcodeLinker` step a little bit, and add tests for it. It also adds tests for `LldWrapper`.

r? `@jieyouxu`
2025-07-08 22:50:26 -05:00
Josh Stone
87e7539fcd Disable docs for compiler-builtins and sysroot
Bootstrap already had a manual doc filter for the `sysroot` crate, but
other library crates keep themselves out of the public docs by setting
`[lib] doc = false` in their manifest. This seems like a better solution
to hide `compiler-builtins` docs, and removes the `sysroot` hack too.
2025-07-08 16:59:44 -07:00
binarycat
1f80fd0f23 bootstrap: add change tracker entry for new --extra-checks=auto: feature 2025-07-08 16:16:48 -05:00
binarycat
64456e07b8 tidy: add auto: prefix to --extra-checks syntax
currently this just uses a very simple
extension-based heirustic.
2025-07-08 16:16:48 -05:00
Aleksey Kliger
7c8a6d978b Spelling 2025-07-08 14:18:07 -04:00
Jakub Beránek
961bac0b19
Add cross-compilation tool test 2025-07-08 15:06:27 +02:00
Aleksey Kliger
3ba8e330f9 Rewrite for clarity
move common code to a helper function

Co-Authored-By: Kobzol <berykubik@gmail.com>
2025-07-08 07:37:44 -04:00
Jakub Beránek
b14323aedc
Also test LldWrapper and remove llvm-config override from tests 2025-07-08 11:49:08 +02:00
Jakub Beránek
fd37722001
Update llvm-bitcode-linker tests 2025-07-08 11:47:57 +02:00
Jakub Beránek
c33f908f57
Remove sysroot copy from LlvmBitcodeLinker step
That step should be responsible for building the tool, not performing side-effects. Also, only copy the tool to the `self-contained` directory, not to the `rustlib/<target>/bin` directory.
2025-07-08 11:39:48 +02:00
Jakub Beránek
754d46e33a
Remove extra_features from LlvmBitcodeLinker
It wasn't used anywhere.
2025-07-08 11:39:43 +02:00
Rémy Rakic
d6179022c1 update bootstrap mcp510 handling
beta and stage1 need to use different flags (-C vs -Z) to be able to use
the old and new `linker-features` and `link-self-contained` flags
2025-07-08 09:21:35 +00:00
Rémy Rakic
a4ea949356 use LLD by default on x64 regardless of channel 2025-07-08 08:08:40 +00:00
Jakub Beránek
d6bc881afb
Fix handling of std crates for no_std targets 2025-07-08 09:26:55 +02:00
Jakub Beránek
5880a3196b
Add crates metadata to doc::Std step 2025-07-08 09:21:35 +02:00
Jakub Beránek
8d0c55cb6b
Remove test hack for std crates 2025-07-08 09:21:35 +02:00
Jakub Beránek
8a195efa1e
Make it possible to attach opaque string metadata to StepMetadata 2025-07-07 23:06:18 +02:00
Aleksey Kliger
b6d2130867 Add docstring 2025-07-07 15:56:37 -04:00
Aleksey Kliger
e2891c0fb9 configure.py: Write last key in each section
The loop that writes the keys in each section of bootstrap.toml
accumulates all the commented lines before a given key and emits them
when it reaches the next key in the section.  This ends up dropping
lines accumulated for the last key
2025-07-07 14:54:50 -04:00
Jieyou Xu
979d7b2ca1
Add change tracker entry for disabling download-rustc temporarily 2025-07-07 19:30:37 +08:00
nora
9adbf6270e
Disable download-rustc for library profile
The feature currently completely breaks `x test`, core functionality of working on the standard library.
Therefore it should be disabled by default until that problem is fixed.
Having to wait a bit longer for a check build is nothing compared to completely mysterious build errors when testing.
2025-07-07 13:02:00 +02:00
Jakub Beránek
5dc77ba658
Do not ever cross-check bootstrap tools 2025-07-06 17:25:19 +02:00
Jakub Beránek
baa55aef3a
Fix CI 2025-07-06 17:25:19 +02:00
Jakub Beránek
18768f0888
Horrible hack to make codegen backends "work" during check 2025-07-06 17:25:19 +02:00
Jakub Beránek
775c970aae
Add support for allowing features when checking tools 2025-07-06 17:25:19 +02:00
Jakub Beránek
20719767bc
Use stage auto-bump when cross-checking on stage 1 2025-07-06 17:25:19 +02:00
Jakub Beránek
97da04c922
Add #[tracing::instrument] to the LLVM build step 2025-07-06 17:25:19 +02:00
Jakub Beránek
33e6b7aa09
Update library cross-compilation test 2025-07-06 17:25:19 +02:00
Jakub Beránek
8d4d0502bd
Update Mode::ToolStd comment 2025-07-06 17:25:19 +02:00
Jakub Beránek
40176388d2
Add staging comment to check::Rustc 2025-07-06 17:25:19 +02:00