@@ -263,7 +263,7 @@ impl Step for Cargotest {
263263 . arg ( & out_dir)
264264 . args ( builder. config . test_args ( ) )
265265 . env ( "RUSTC" , builder. rustc ( compiler) )
266- . env ( "RUSTDOC" , builder. rustdoc ( compiler) ) ;
266+ . env ( "RUSTDOC" , builder. rustdoc_for_compiler ( compiler) ) ;
267267 add_rustdoc_cargo_linker_args (
268268 & mut cmd,
269269 builder,
@@ -878,7 +878,7 @@ impl Step for RustdocTheme {
878878 . env ( "RUSTC_SYSROOT" , builder. sysroot ( self . compiler ) )
879879 . env ( "RUSTDOC_LIBDIR" , builder. sysroot_target_libdir ( self . compiler , self . compiler . host ) )
880880 . env ( "CFG_RELEASE_CHANNEL" , & builder. config . channel )
881- . env ( "RUSTDOC_REAL" , builder. rustdoc ( self . compiler ) )
881+ . env ( "RUSTDOC_REAL" , builder. rustdoc_for_compiler ( self . compiler ) )
882882 . env ( "RUSTC_BOOTSTRAP" , "1" ) ;
883883 cmd. args ( linker_args ( builder, self . compiler . host , LldThreads :: No , self . compiler . stage ) ) ;
884884
@@ -1037,7 +1037,11 @@ impl Step for RustdocGUI {
10371037 let mut cmd = builder. tool_cmd ( Tool :: RustdocGUITest ) ;
10381038
10391039 let out_dir = builder. test_out ( self . target ) . join ( "rustdoc-gui" ) ;
1040- build_stamp:: clear_if_dirty ( builder, & out_dir, & builder. rustdoc ( self . compiler ) ) ;
1040+ build_stamp:: clear_if_dirty (
1041+ builder,
1042+ & out_dir,
1043+ & builder. rustdoc_for_compiler ( self . compiler ) ,
1044+ ) ;
10411045
10421046 if let Some ( src) = builder. config . src . to_str ( ) {
10431047 cmd. arg ( "--rust-src" ) . arg ( src) ;
@@ -1053,7 +1057,7 @@ impl Step for RustdocGUI {
10531057
10541058 cmd. arg ( "--jobs" ) . arg ( builder. jobs ( ) . to_string ( ) ) ;
10551059
1056- cmd. env ( "RUSTDOC" , builder. rustdoc ( self . compiler ) )
1060+ cmd. env ( "RUSTDOC" , builder. rustdoc_for_compiler ( self . compiler ) )
10571061 . env ( "RUSTC" , builder. rustc ( self . compiler ) ) ;
10581062
10591063 add_rustdoc_cargo_linker_args (
@@ -1742,7 +1746,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17421746 || mode == "rustdoc-json"
17431747 || suite == "coverage-run-rustdoc"
17441748 {
1745- cmd. arg ( "--rustdoc-path" ) . arg ( builder. rustdoc ( compiler) ) ;
1749+ cmd. arg ( "--rustdoc-path" ) . arg ( builder. rustdoc_for_compiler ( compiler) ) ;
17461750 }
17471751
17481752 if mode == "rustdoc-json" {
@@ -2258,7 +2262,7 @@ impl BookTest {
22582262
22592263 // mdbook just executes a binary named "rustdoc", so we need to update
22602264 // PATH so that it points to our rustdoc.
2261- let mut rustdoc_path = builder. rustdoc ( compiler) ;
2265+ let mut rustdoc_path = builder. rustdoc_for_compiler ( compiler) ;
22622266 rustdoc_path. pop ( ) ;
22632267 let old_path = env:: var_os ( "PATH" ) . unwrap_or_default ( ) ;
22642268 let new_path = env:: join_paths ( iter:: once ( rustdoc_path) . chain ( env:: split_paths ( & old_path) ) )
0 commit comments