Skip to content

Commit 6ff9c6f

Browse files
committed
don't use entire sysroot binary path for rustc tarballs
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]>
1 parent 81c068a commit 6ff9c6f

File tree

1 file changed

+3
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+3
-2
lines changed

src/bootstrap/src/core/build_steps/dist.rs

+3-2
Original file line numberDiff line numberDiff 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
402+
builder.install(&src.join("bin").join(exe("rustc", host)), &image.join("bin"), 0o755);
402403
t!(fs::create_dir_all(image.join("bin")));
403-
builder.cp_r(&src.join("bin"), &image.join("bin"));
404404

405+
// If enabled, copy rustdoc binary
405406
if builder
406407
.config
407408
.tools

0 commit comments

Comments
 (0)