@@ -115,7 +115,7 @@ impl Step for JsonDocs {
115115 /// Builds the `rust-docs-json` installer component.
116116 fn run ( self , builder : & Builder < ' _ > ) -> Option < GeneratedTarball > {
117117 let target = self . target ;
118- builder. ensure ( crate :: core:: build_steps:: doc:: Std :: from_build_compiler (
118+ let directory = builder. ensure ( crate :: core:: build_steps:: doc:: Std :: from_build_compiler (
119119 self . build_compiler ,
120120 target,
121121 DocumentationFormat :: Json ,
@@ -126,7 +126,7 @@ impl Step for JsonDocs {
126126 let mut tarball = Tarball :: new ( builder, "rust-docs-json" , & target. triple ) ;
127127 tarball. set_product_name ( "Rust Documentation In JSON Format" ) ;
128128 tarball. is_preview ( true ) ;
129- tarball. add_bulk_dir ( builder . json_doc_out ( target ) , dest) ;
129+ tarball. add_bulk_dir ( directory , dest) ;
130130 Some ( tarball. generate ( ) )
131131 }
132132}
@@ -1575,19 +1575,21 @@ impl Step for Extended {
15751575 } ;
15761576 }
15771577
1578+ let target_compiler = builder. compiler ( stage, target) ;
15781579 // When rust-std package split from rustc, we needed to ensure that during
15791580 // upgrades rustc was upgraded before rust-std. To avoid rustc clobbering
15801581 // the std files during uninstall. To do this ensure that rustc comes
15811582 // before rust-std in the list below.
1582- tarballs. push ( builder. ensure ( Rustc { compiler : builder . compiler ( stage , target ) } ) ) ;
1583+ tarballs. push ( builder. ensure ( Rustc { compiler : target_compiler } ) ) ;
15831584 tarballs. push ( builder. ensure ( Std { compiler, target } ) . expect ( "missing std" ) ) ;
15841585
15851586 if target. is_windows_gnu ( ) {
15861587 tarballs. push ( builder. ensure ( Mingw { host : target } ) . expect ( "missing mingw" ) ) ;
15871588 }
15881589
15891590 add_component ! ( "rust-docs" => Docs { host: target } ) ;
1590- add_component ! ( "rust-json-docs" => JsonDocs { build_compiler: compiler, target } ) ;
1591+ // Std stage N is documented with compiler stage N
1592+ add_component ! ( "rust-json-docs" => JsonDocs { build_compiler: target_compiler, target } ) ;
15911593 add_component ! ( "cargo" => Cargo { build_compiler: compiler, target } ) ;
15921594 add_component ! ( "rustfmt" => Rustfmt { build_compiler: compiler, target } ) ;
15931595 add_component ! ( "rust-analyzer" => RustAnalyzer { build_compiler: compiler, target } ) ;
0 commit comments