@@ -668,28 +668,27 @@ impl<'a> Builder<'a> {
668
668
. map ( |entry| entry. path ( ) )
669
669
}
670
670
671
- pub fn rustdoc ( & self , host : Interned < String > ) -> PathBuf {
672
- self . ensure ( tool:: Rustdoc { host } )
671
+ pub fn rustdoc ( & self , compiler : Compiler ) -> PathBuf {
672
+ self . ensure ( tool:: Rustdoc { compiler } )
673
673
}
674
674
675
- pub fn rustdoc_cmd ( & self , host : Interned < String > ) -> Command {
675
+ pub fn rustdoc_cmd ( & self , compiler : Compiler ) -> Command {
676
676
let mut cmd = Command :: new ( & self . out . join ( "bootstrap/debug/rustdoc" ) ) ;
677
- let compiler = self . compiler ( self . top_stage , host) ;
678
677
cmd. env ( "RUSTC_STAGE" , compiler. stage . to_string ( ) )
679
678
. env ( "RUSTC_SYSROOT" , self . sysroot ( compiler) )
680
679
// Note that this is *not* the sysroot_libdir because rustdoc must be linked
681
680
// equivalently to rustc.
682
681
. env ( "RUSTDOC_LIBDIR" , self . rustc_libdir ( compiler) )
683
682
. env ( "CFG_RELEASE_CHANNEL" , & self . config . channel )
684
- . env ( "RUSTDOC_REAL" , self . rustdoc ( host ) )
683
+ . env ( "RUSTDOC_REAL" , self . rustdoc ( compiler ) )
685
684
. env ( "RUSTDOC_CRATE_VERSION" , self . rust_version ( ) )
686
685
. env ( "RUSTC_BOOTSTRAP" , "1" ) ;
687
686
688
687
// Remove make-related flags that can cause jobserver problems.
689
688
cmd. env_remove ( "MAKEFLAGS" ) ;
690
689
cmd. env_remove ( "MFLAGS" ) ;
691
690
692
- if let Some ( linker) = self . linker ( host) {
691
+ if let Some ( linker) = self . linker ( compiler . host ) {
693
692
cmd. env ( "RUSTC_TARGET_LINKER" , linker) ;
694
693
}
695
694
cmd
@@ -751,7 +750,7 @@ impl<'a> Builder<'a> {
751
750
// This is the intended out directory for compiler documentation.
752
751
my_out = self . compiler_doc_out ( target) ;
753
752
}
754
- let rustdoc = self . rustdoc ( compiler. host ) ;
753
+ let rustdoc = self . rustdoc ( compiler) ;
755
754
self . clear_if_dirty ( & my_out, & rustdoc) ;
756
755
} else if cmd != "test" {
757
756
match mode {
@@ -897,7 +896,7 @@ impl<'a> Builder<'a> {
897
896
. env (
898
897
"RUSTDOC_REAL" ,
899
898
if cmd == "doc" || cmd == "rustdoc" || ( cmd == "test" && want_rustdoc) {
900
- self . rustdoc ( compiler. host )
899
+ self . rustdoc ( compiler)
901
900
} else {
902
901
PathBuf :: from ( "/path/to/nowhere/rustdoc/not/required" )
903
902
} ,
0 commit comments