install rustc before the tools
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
81c068a7a6
commit
435e1c6dc5
@ -398,10 +398,11 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
||||
let host = compiler.host;
|
||||
let src = builder.sysroot(compiler);
|
||||
|
||||
// Copy rustc/rustdoc binaries
|
||||
// Copy rustc binary
|
||||
t!(fs::create_dir_all(image.join("bin")));
|
||||
builder.cp_r(&src.join("bin"), &image.join("bin"));
|
||||
|
||||
// If enabled, copy rustdoc binary
|
||||
if builder
|
||||
.config
|
||||
.tools
|
||||
|
@ -858,6 +858,11 @@ macro_rules! describe {
|
||||
Kind::Install => describe!(
|
||||
install::Docs,
|
||||
install::Std,
|
||||
// During the Rust compiler (rustc) installation process, we copy the entire sysroot binary
|
||||
// path (build/host/stage2/bin). Since the building tools also make their copy in the sysroot
|
||||
// binary path, we must install rustc before the tools. Otherwise, the rust-installer will
|
||||
// install the same binaries twice for each tool, leaving backup files (*.old) as a result.
|
||||
install::Rustc,
|
||||
install::Cargo,
|
||||
install::RustAnalyzer,
|
||||
install::Rustfmt,
|
||||
@ -866,7 +871,6 @@ macro_rules! describe {
|
||||
install::Miri,
|
||||
install::LlvmTools,
|
||||
install::Src,
|
||||
install::Rustc,
|
||||
),
|
||||
Kind::Run => describe!(
|
||||
run::ExpandYamlAnchors,
|
||||
|
Loading…
Reference in New Issue
Block a user