Skip to content

Comments

Add build.rustdoc option to bootstrap config#152921

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
blkerby:bootstrap-rustdoc-config
Feb 22, 2026
Merged

Add build.rustdoc option to bootstrap config#152921
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
blkerby:bootstrap-rustdoc-config

Conversation

@blkerby
Copy link
Contributor

@blkerby blkerby commented Feb 20, 2026

This adds a bootstrap config option build.rustdoc to be able to override the stage0 rustdoc binary. When unspecified, this defaults to the existing behavior of using the rustdoc binary in the same directory as rustc, making this a backward-compatible change.

Motivation

The existing behavior does not seem to be documented and can be surprising. By adding the new option, the behavior gets documented in bootstrap.example.toml.

I ran into this because I was experimenting with a build with a configuration like this:

build.rustc = "/usr/bin/rustc-1.92"
build.cargo = "/usr/bin/cargo-1.92"

This was on Ubuntu where the packages rustc-1.92 and cargo-1.92 place symlinks at these locations. This resulted in failure as the bootstrap process tried to run doc tests on tidy using a binary /usr/bin/rustdoc which did not exist. It took some digging to understand where that path /usr/bin/rustdoc was coming from.

@rustbot label +A-bootstrap-config

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 20, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 20, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@rustbot rustbot added the A-bootstrap-config Area: bootstrap `config.toml` and the config system label Feb 20, 2026
@Kobzol
Copy link
Member

Kobzol commented Feb 21, 2026

Looks reasonable, thanks!

r? @Kobzol

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 21, 2026

📌 Commit 7df7485 has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 21, 2026
@rust-bors rust-bors bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 21, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 21, 2026
…r=Kobzol

Add build.rustdoc option to bootstrap config

This adds a bootstrap config option `build.rustdoc` to be able to override the stage0 `rustdoc` binary. When unspecified, this defaults to the existing behavior of using the `rustdoc` binary in the same directory as `rustc`, making this a backward-compatible change.

### Motivation

The existing behavior does not seem to be documented and can be surprising. By adding the new option, the behavior gets documented in `bootstrap.example.toml`.

I ran into this because I was experimenting with a build with a configuration like this:
```
build.rustc = "/usr/bin/rustc-1.92"
build.cargo = "/usr/bin/cargo-1.92"
```
This was on Ubuntu where the packages `rustc-1.92` and `cargo-1.92` place symlinks at these locations. This resulted in failure as the bootstrap process tried to run doc tests on `tidy` using a binary `/usr/bin/rustdoc` which did not exist. It took some digging to understand where that path `/usr/bin/rustdoc` was coming from.

@rustbot label +A-bootstrap-config
rust-bors bot pushed a commit that referenced this pull request Feb 21, 2026
Rollup of 14 pull requests

Successful merges:

 - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - #151740 (Fix short backtraces from stripped executables)
 - #151871 (don't use env with infer vars)
 - #152591 (Simplify internals of `{Rc,Arc}::default`)
 - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - #152908 (Enable rust.remap-debuginfo in the dist profile)
 - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - #152767 (fix typo in `carryless_mul` macro invocation)
 - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - #152871 (Fix warnings in rs{begin,end}.rs files)
 - #152921 (Add build.rustdoc option to bootstrap config)
 - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - #152937 (remove unneeded reboxing)
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 22, 2026
…r=Kobzol

Add build.rustdoc option to bootstrap config

This adds a bootstrap config option `build.rustdoc` to be able to override the stage0 `rustdoc` binary. When unspecified, this defaults to the existing behavior of using the `rustdoc` binary in the same directory as `rustc`, making this a backward-compatible change.

### Motivation

The existing behavior does not seem to be documented and can be surprising. By adding the new option, the behavior gets documented in `bootstrap.example.toml`.

I ran into this because I was experimenting with a build with a configuration like this:
```
build.rustc = "/usr/bin/rustc-1.92"
build.cargo = "/usr/bin/cargo-1.92"
```
This was on Ubuntu where the packages `rustc-1.92` and `cargo-1.92` place symlinks at these locations. This resulted in failure as the bootstrap process tried to run doc tests on `tidy` using a binary `/usr/bin/rustdoc` which did not exist. It took some digging to understand where that path `/usr/bin/rustdoc` was coming from.

@rustbot label +A-bootstrap-config
rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
Rollup of 15 pull requests

Successful merges:

 - #149366 (GVN: consider constants of primitive types as deterministic)
 - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - #151871 (don't use env with infer vars)
 - #152591 (Simplify internals of `{Rc,Arc}::default`)
 - #152657 (std: move `exit` out of PAL)
 - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - #152908 (Enable rust.remap-debuginfo in the dist profile)
 - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - #152767 (fix typo in `carryless_mul` macro invocation)
 - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - #152871 (Fix warnings in rs{begin,end}.rs files)
 - #152921 (Add build.rustdoc option to bootstrap config)
 - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - #152937 (remove unneeded reboxing)
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 22, 2026
…r=Kobzol

Add build.rustdoc option to bootstrap config

This adds a bootstrap config option `build.rustdoc` to be able to override the stage0 `rustdoc` binary. When unspecified, this defaults to the existing behavior of using the `rustdoc` binary in the same directory as `rustc`, making this a backward-compatible change.

### Motivation

The existing behavior does not seem to be documented and can be surprising. By adding the new option, the behavior gets documented in `bootstrap.example.toml`.

I ran into this because I was experimenting with a build with a configuration like this:
```
build.rustc = "/usr/bin/rustc-1.92"
build.cargo = "/usr/bin/cargo-1.92"
```
This was on Ubuntu where the packages `rustc-1.92` and `cargo-1.92` place symlinks at these locations. This resulted in failure as the bootstrap process tried to run doc tests on `tidy` using a binary `/usr/bin/rustdoc` which did not exist. It took some digging to understand where that path `/usr/bin/rustdoc` was coming from.

@rustbot label +A-bootstrap-config
rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
Rollup of 14 pull requests

Successful merges:

 - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - #151871 (don't use env with infer vars)
 - #152591 (Simplify internals of `{Rc,Arc}::default`)
 - #152657 (std: move `exit` out of PAL)
 - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - #152908 (Enable rust.remap-debuginfo in the dist profile)
 - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - #152767 (fix typo in `carryless_mul` macro invocation)
 - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - #152871 (Fix warnings in rs{begin,end}.rs files)
 - #152921 (Add build.rustdoc option to bootstrap config)
 - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - #152937 (remove unneeded reboxing)
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 22, 2026
…r=Kobzol

Add build.rustdoc option to bootstrap config

This adds a bootstrap config option `build.rustdoc` to be able to override the stage0 `rustdoc` binary. When unspecified, this defaults to the existing behavior of using the `rustdoc` binary in the same directory as `rustc`, making this a backward-compatible change.

### Motivation

The existing behavior does not seem to be documented and can be surprising. By adding the new option, the behavior gets documented in `bootstrap.example.toml`.

I ran into this because I was experimenting with a build with a configuration like this:
```
build.rustc = "/usr/bin/rustc-1.92"
build.cargo = "/usr/bin/cargo-1.92"
```
This was on Ubuntu where the packages `rustc-1.92` and `cargo-1.92` place symlinks at these locations. This resulted in failure as the bootstrap process tried to run doc tests on `tidy` using a binary `/usr/bin/rustdoc` which did not exist. It took some digging to understand where that path `/usr/bin/rustdoc` was coming from.

@rustbot label +A-bootstrap-config
rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
Rollup of 13 pull requests

Successful merges:

 - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - #151871 (don't use env with infer vars)
 - #152591 (Simplify internals of `{Rc,Arc}::default`)
 - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - #152908 (Enable rust.remap-debuginfo in the dist profile)
 - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - #152767 (fix typo in `carryless_mul` macro invocation)
 - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - #152871 (Fix warnings in rs{begin,end}.rs files)
 - #152921 (Add build.rustdoc option to bootstrap config)
 - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - #152937 (remove unneeded reboxing)
@jhpratt
Copy link
Member

jhpratt commented Feb 22, 2026

@bors r-

#152957 (comment)

@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 22, 2026
@Kobzol
Copy link
Member

Kobzol commented Feb 22, 2026

Hmm, I'm pretty sure this PR wasn't the cause.

@Kobzol
Copy link
Member

Kobzol commented Feb 22, 2026

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 22, 2026

📌 Commit 7df7485 has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 22, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 22, 2026
…r=Kobzol

Add build.rustdoc option to bootstrap config

This adds a bootstrap config option `build.rustdoc` to be able to override the stage0 `rustdoc` binary. When unspecified, this defaults to the existing behavior of using the `rustdoc` binary in the same directory as `rustc`, making this a backward-compatible change.

### Motivation

The existing behavior does not seem to be documented and can be surprising. By adding the new option, the behavior gets documented in `bootstrap.example.toml`.

I ran into this because I was experimenting with a build with a configuration like this:
```
build.rustc = "/usr/bin/rustc-1.92"
build.cargo = "/usr/bin/cargo-1.92"
```
This was on Ubuntu where the packages `rustc-1.92` and `cargo-1.92` place symlinks at these locations. This resulted in failure as the bootstrap process tried to run doc tests on `tidy` using a binary `/usr/bin/rustdoc` which did not exist. It took some digging to understand where that path `/usr/bin/rustdoc` was coming from.

@rustbot label +A-bootstrap-config
rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #152385 (Feature gate for defaulted associated type_consts with associated_type_defaults )
 - #152921 (Add build.rustdoc option to bootstrap config)
 - #152926 (Fix ICE when an associated type is wrongly marked as `final`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 22, 2026
…r=Kobzol

Add build.rustdoc option to bootstrap config

This adds a bootstrap config option `build.rustdoc` to be able to override the stage0 `rustdoc` binary. When unspecified, this defaults to the existing behavior of using the `rustdoc` binary in the same directory as `rustc`, making this a backward-compatible change.

### Motivation

The existing behavior does not seem to be documented and can be surprising. By adding the new option, the behavior gets documented in `bootstrap.example.toml`.

I ran into this because I was experimenting with a build with a configuration like this:
```
build.rustc = "/usr/bin/rustc-1.92"
build.cargo = "/usr/bin/cargo-1.92"
```
This was on Ubuntu where the packages `rustc-1.92` and `cargo-1.92` place symlinks at these locations. This resulted in failure as the bootstrap process tried to run doc tests on `tidy` using a binary `/usr/bin/rustdoc` which did not exist. It took some digging to understand where that path `/usr/bin/rustdoc` was coming from.

@rustbot label +A-bootstrap-config
rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #149366 (GVN: consider constants of primitive types as deterministic)
 - #152779 (Clarify aspects of query macros)
 - #152958 (`rustc_queries` simplifications)
 - #152385 (Feature gate for defaulted associated type_consts with associated_type_defaults )
 - #152708 (Build: Add `stdenv.cc.cc.lib` to Nix dependencies)
 - #152921 (Add build.rustdoc option to bootstrap config)
 - #152926 (Fix ICE when an associated type is wrongly marked as `final`)
 - #152927 (Index expressions rendered the index: subexpression as the id, instea…)
rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #152779 (Clarify aspects of query macros)
 - #152958 (`rustc_queries` simplifications)
 - #152385 (Feature gate for defaulted associated type_consts with associated_type_defaults )
 - #152708 (Build: Add `stdenv.cc.cc.lib` to Nix dependencies)
 - #152921 (Add build.rustdoc option to bootstrap config)
 - #152926 (Fix ICE when an associated type is wrongly marked as `final`)
 - #152927 (Index expressions rendered the index: subexpression as the id, instea…)
@rust-bors rust-bors bot merged commit 4f2673f into rust-lang:main Feb 22, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 22, 2026
rust-timer added a commit that referenced this pull request Feb 22, 2026
Rollup merge of #152921 - blkerby:bootstrap-rustdoc-config, r=Kobzol

Add build.rustdoc option to bootstrap config

This adds a bootstrap config option `build.rustdoc` to be able to override the stage0 `rustdoc` binary. When unspecified, this defaults to the existing behavior of using the `rustdoc` binary in the same directory as `rustc`, making this a backward-compatible change.

### Motivation

The existing behavior does not seem to be documented and can be surprising. By adding the new option, the behavior gets documented in `bootstrap.example.toml`.

I ran into this because I was experimenting with a build with a configuration like this:
```
build.rustc = "/usr/bin/rustc-1.92"
build.cargo = "/usr/bin/cargo-1.92"
```
This was on Ubuntu where the packages `rustc-1.92` and `cargo-1.92` place symlinks at these locations. This resulted in failure as the bootstrap process tried to run doc tests on `tidy` using a binary `/usr/bin/rustdoc` which did not exist. It took some digging to understand where that path `/usr/bin/rustdoc` was coming from.

@rustbot label +A-bootstrap-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-bootstrap-config Area: bootstrap `config.toml` and the config system S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants