Closed
Description
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
fromsrc/tools/rustdoc
- Make
src/tools/rustdoc/src/main.rs
a one-line shim torustdoc::main
- Remove all
librustc*
dependencies insrc/librustdoc/Cargo.toml
- Rework rustbuild rules and dependencies to account for this movement
- Rework assembling the distribution in
dist.rs
to account moving therustdoc
executable into place.