This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
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 @@ -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