Skip to content

Commit ad4acba

Browse files
Build rustdoc with the stageN compiler in N >= 2.
This permits proc macro crates to correctly work with rustdoc.
1 parent 83b6812 commit ad4acba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap/tool.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ impl Step for Rustdoc {
260260
let target = target_compiler.host;
261261
let build_compiler = if target_compiler.stage == 0 {
262262
builder.compiler(0, builder.build.build)
263+
} else if target_compiler.stage >= 2 {
264+
// Past stage 2, we consider the compiler to be ABI-compatible and hence capable of
265+
// building rustdoc itself.
266+
target_compiler
263267
} else {
264268
// Similar to `compile::Assemble`, build with the previous stage's compiler. Otherwise
265269
// we'd have stageN/bin/rustc and stageN/bin/rustdoc be effectively different stage

0 commit comments

Comments
 (0)