diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-10 20:28:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-10 20:28:48 +0200 |
| commit | 55a57fcbac52086ea1474f7b3dd5d275028eb132 (patch) | |
| tree | ec709566bb2a4147afb49fbf973aac1b620dd897 /compiler/rustc_codegen_llvm/src | |
| parent | 9e6af56e12a8ed34f2a51535f26d1de4a4ce7b33 (diff) | |
| parent | 6c38d389f26faf36a3b674f802c37804f5442c0d (diff) | |
| download | rust-55a57fcbac52086ea1474f7b3dd5d275028eb132.tar.gz rust-55a57fcbac52086ea1474f7b3dd5d275028eb132.zip | |
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`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
