Skip to content

Commit

Permalink
Never build rustdoc in stage 0
Browse files Browse the repository at this point in the history
When a request for rustdoc is passed for stage 0, x.py build --stage 0
src/tools/rustdoc or ensure(tool::Rustdoc { .. }) with top_stage = 0, we
return the rustdoc for that compiler (i.e., the beta rustdoc).
  • Loading branch information
Mark-Simulacrum committed Feb 11, 2019
1 parent 57d7cfc commit 861d007
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bootstrap/tool.rs
Expand Up @@ -418,6 +418,12 @@ impl Step for Rustdoc {

fn run(self, builder: &Builder) -> PathBuf {
let target_compiler = builder.compiler(builder.top_stage, self.host);
if target_compiler.stage == 0 {
if !target_compiler.is_snapshot(builder) {
panic!("rustdoc in stage 0 must be snapshot rustdoc");
}
return builder.initial_rustc.with_file_name(exe("rustdoc", &target_compiler.host));
}
let target = target_compiler.host;
let build_compiler = if target_compiler.stage == 0 {
builder.compiler(0, builder.config.build)
Expand Down

0 comments on commit 861d007

Please sign in to comment.