File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -398,10 +398,11 @@ impl Step for Rustc {
398398 let host = compiler. host ;
399399 let src = builder. sysroot ( compiler) ;
400400
401- // Copy rustc/rustdoc binaries
401+ // Copy rustc binary
402402 t ! ( fs:: create_dir_all( image. join( "bin" ) ) ) ;
403403 builder. cp_r ( & src. join ( "bin" ) , & image. join ( "bin" ) ) ;
404404
405+ // If enabled, copy rustdoc binary
405406 if builder
406407 . config
407408 . tools
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ fn install_sh(
9595 }
9696
9797 let datadir = prefix. join ( default_path ( & builder. config . datadir , "share" ) ) ;
98- let docdir = prefix. join ( default_path ( & builder. config . docdir , "share/doc/rust" ) ) ;
98+ let docdir = prefix. join ( default_path ( & builder. config . docdir , & format ! ( "share/doc/{package}" ) ) ) ;
9999 let mandir = prefix. join ( default_path ( & builder. config . mandir , "share/man" ) ) ;
100100 let libdir = prefix. join ( default_path ( & builder. config . libdir , "lib" ) ) ;
101101 let bindir = prefix. join ( & builder. config . bindir ) ; // Default in config.rs
Original file line number Diff line number Diff line change @@ -858,6 +858,11 @@ impl<'a> Builder<'a> {
858858 Kind :: Install => describe ! (
859859 install:: Docs ,
860860 install:: Std ,
861+ // During the Rust compiler (rustc) installation process, we copy the entire sysroot binary
862+ // path (build/host/stage2/bin). Since the building tools also make their copy in the sysroot
863+ // binary path, we must install rustc before the tools. Otherwise, the rust-installer will
864+ // install the same binaries twice for each tool, leaving backup files (*.old) as a result.
865+ install:: Rustc ,
861866 install:: Cargo ,
862867 install:: RustAnalyzer ,
863868 install:: Rustfmt ,
@@ -866,7 +871,6 @@ impl<'a> Builder<'a> {
866871 install:: Miri ,
867872 install:: LlvmTools ,
868873 install:: Src ,
869- install:: Rustc ,
870874 ) ,
871875 Kind :: Run => describe ! (
872876 run:: ExpandYamlAnchors ,
You can’t perform that action at this time.
0 commit comments