File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -680,12 +680,22 @@ impl Step for Miri {
680
680
.arg("--manifest-path")
681
681
.arg(builder.src.join("src/tools/miri/test-cargo-miri/Cargo.toml"));
682
682
cargo.arg("--target").arg(target.rustc_target_arg());
683
- cargo.arg("--").args(builder.config.test_args());
684
683
685
684
// `prepare_tool_cargo` sets RUSTDOC to the bootstrap wrapper and RUSTDOC_REAL to a dummy path as this is a "run", not a "test".
686
685
// Also, we want the rustdoc from the "next" stage for the same reason that we build a std from the next stage.
687
686
// So let's just set that here, and bypass bootstrap's RUSTDOC (just like cargo-miri already ignores bootstrap's RUSTC_WRAPPER).
688
- cargo.env("RUSTDOC", builder.rustdoc(compiler_std));
687
+ if builder.doc_tests != DocTests::No {
688
+ cargo.env("RUSTDOC", builder.rustdoc(compiler_std));
689
+ }
690
+ match builder.doc_tests {
691
+ DocTests::Yes => {}
692
+ DocTests::No => {
693
+ cargo.arg("--tests");
694
+ }
695
+ DocTests::Only => {
696
+ cargo.arg("--doc");
697
+ }
698
+ }
689
699
690
700
// Tell `cargo miri` where to find things.
691
701
cargo.env("MIRI_SYSROOT", &miri_sysroot);
@@ -694,6 +704,8 @@ impl Step for Miri {
694
704
// Debug things.
695
705
cargo.env("RUST_BACKTRACE", "1");
696
706
707
+ // Finally, pass test-args and run everything.
708
+ cargo.arg("--").args(builder.config.test_args());
697
709
let mut cargo = Command::from(cargo);
698
710
{
699
711
let _time = helpers::timeit(builder);
You can’t perform that action at this time.
0 commit comments