Skip to content

Don't bootstrap with rustdoc #43284

Closed
@alexcrichton

Description

@alexcrichton

Currently the rustdoc executable is bootstrapped in the same manner as rustc itself, meaning that we compile rustdoc itself once per stage. This isn't really necessary though as we only really need to bootstrap the compiler! As a result dev times are slower (stage0/stage1 need to compile rustdoc) and overall CI times are slower (we compile it twice instead of once).

I think we could instead move rustdoc to src/tools and instead compile it in only one stage, the final stage. This'll involve a few changes such as:

  • Delete src/driver (I think this is an old vestigate at this point anyway?
  • Add src/tools/rustdoc
  • Add dependency on src/librustdoc from src/tools/rustdoc
  • Make src/tools/rustdoc/src/main.rs a one-line shim to rustdoc::main
  • Remove all librustc* dependencies in src/librustdoc/Cargo.toml
  • Rework rustbuild rules and dependencies to account for this movement
  • Rework assembling the distribution in dist.rs to account moving the rustdoc executable into place.

Metadata

Metadata

Labels

T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions