Skip to content

Commit

Permalink
don't use entire sysroot binary path for rustc tarballs
Browse files Browse the repository at this point in the history
Previously, we used the entire sysroot binary path to prepare rustc tarballs.
Since we also copy tool binaries to the sysroot binary path, installing rustc
and tools with `x install` results in attempting to install the same binaries
more than once. This causes rust-installer to create backup files (*.old) due
to file conflicts. This change fixes that.

Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Feb 14, 2024
1 parent 81c068a commit e4a15d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,11 @@ impl Step for Rustc {
let host = compiler.host;
let src = builder.sysroot(compiler);

// Copy rustc/rustdoc binaries
// Copy rustc binary
builder.install(&src.join("bin").join("rustc"), &image.join("bin"), 0o755);
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
Expand Down

0 comments on commit e4a15d4

Please sign in to comment.