Skip to content

Commit

Permalink
Rollup merge of rust-lang#88675 - jyn514:faster-doc, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Don't build the compiler and standard library before documenting them

Rustdoc doesn't require the build artifacts to generate the docs, and
especially in the case of rustc, it greatly increases the time needed to
run the build.

r? ```@Mark-Simulacrum``` cc ```@steffahn```
  • Loading branch information
Manishearth authored Sep 12, 2021
2 parents 547d937 + 04db063 commit f00af15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ impl Step for Std {
t!(fs::create_dir_all(&out));
let compiler = builder.compiler(stage, builder.config.build);

builder.ensure(compile::Std { compiler, target });
let out_dir = builder.stage_out(compiler, Mode::Std).join(target.triple).join("doc");

t!(fs::copy(builder.src.join("src/doc/rust.css"), out.join("rust.css")));
Expand Down Expand Up @@ -564,9 +563,10 @@ impl Step for Rustc {
let out = builder.compiler_doc_out(target);
t!(fs::create_dir_all(&out));

// Build rustc.
// Build the standard library, so that proc-macros can use it.
// (Normally, only the metadata would be necessary, but proc-macros are special since they run at compile-time.)
let compiler = builder.compiler(stage, builder.config.build);
builder.ensure(compile::Rustc { compiler, target });
builder.ensure(compile::Std { compiler, target: builder.config.build });

// This uses a shared directory so that librustdoc documentation gets
// correctly built and merged with the rustc documentation. This is
Expand Down

0 comments on commit f00af15

Please sign in to comment.