Skip to content

Commit e79792c

Browse files
Only enable rustdoc --generate-macro-expansion option for stage builds higher than 1
1 parent c8c7b5b commit e79792c

File tree

1 file changed

+5
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+5
-1
lines changed

src/bootstrap/src/core/build_steps/doc.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,11 @@ impl Step for Rustc {
932932
// see https://github.com/rust-lang/rust/pull/122066#issuecomment-1983049222
933933
// If there is any bug, please comment out the next line.
934934
cargo.rustdocflag("--generate-link-to-definition");
935-
cargo.rustdocflag("--generate-macro-expansion");
935+
// FIXME: Currently, `--generate-macro-expansion` option is buggy in `beta` rustdoc. To
936+
// allow CI to pass, we only enable the option in stage 2 and higher.
937+
if builder.top_stage > 1 {
938+
cargo.rustdocflag("--generate-macro-expansion");
939+
}
936940

937941
compile::rustc_cargo(builder, &mut cargo, target, &build_compiler, &self.crates);
938942
cargo.arg("-Zskip-rustdoc-fingerprint");

0 commit comments

Comments
 (0)