Skip to content

Commit

Permalink
Build rustdoc with the stageN compiler in N >= 2.
Browse files Browse the repository at this point in the history
This permits proc macro crates to correctly work with rustdoc.
  • Loading branch information
Mark-Simulacrum committed Aug 13, 2017
1 parent 83b6812 commit ad4acba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bootstrap/tool.rs
Expand Up @@ -260,6 +260,10 @@ impl Step for Rustdoc {
let target = target_compiler.host;
let build_compiler = if target_compiler.stage == 0 {
builder.compiler(0, builder.build.build)
} else if target_compiler.stage >= 2 {
// Past stage 2, we consider the compiler to be ABI-compatible and hence capable of
// building rustdoc itself.
target_compiler
} else {
// Similar to `compile::Assemble`, build with the previous stage's compiler. Otherwise
// we'd have stageN/bin/rustc and stageN/bin/rustdoc be effectively different stage
Expand Down

0 comments on commit ad4acba

Please sign in to comment.