File tree 2 files changed +14
-3
lines changed
bootstrap/src/core/build_steps
tools/miri/cargo-miri/src
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -680,7 +680,16 @@ 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 ( "--tests" ) ; // don't run doctests, they are too confused by the staging
683
+
684
+ if stage == 0 {
685
+ builder. info ( "INFO: miri/test-cargo-miri doctests are ignored on stage 0." ) ;
686
+ // Don't run doctests on stage0, stage0 rustdoc is incompatible with the miri sysroot
687
+ cargo. arg ( "--tests" ) ;
688
+ } else {
689
+ // Miri doesn't know which rustdoc to use by default, so tell which one it should use.
690
+ cargo. env ( "RUSTDOC_REAL" , builder. rustdoc ( compiler) ) ;
691
+ }
692
+
684
693
cargo. arg ( "--" ) . args ( builder. config . test_args ( ) ) ;
685
694
686
695
// Tell `cargo miri` where to find things.
Original file line number Diff line number Diff line change @@ -582,8 +582,10 @@ pub fn phase_rustdoc(mut args: impl Iterator<Item = String>) {
582
582
. map_or ( 0 , |verbose| verbose. parse ( ) . expect ( "verbosity flag must be an integer" ) ) ;
583
583
584
584
// phase_cargo_miri sets the RUSTDOC env var to ourselves, so we can't use that here;
585
- // just default to a straight-forward invocation for now:
586
- let mut cmd = Command :: new ( "rustdoc" ) ;
585
+ // If available, use the one provided by bootstrap; otherwise, simply default to a straightforward
586
+ // invocation for now:
587
+ let rustdoc = env:: var ( "RUSTDOC_REAL" ) . unwrap_or ( "rustdoc" . to_string ( ) ) ;
588
+ let mut cmd = Command :: new ( rustdoc) ;
587
589
588
590
let extern_flag = "--extern" ;
589
591
let runtool_flag = "--runtool" ;
You can’t perform that action at this time.
0 commit comments