From a9a84681aff291c7d5186f141240c6360eb4a05a Mon Sep 17 00:00:00 2001 From: Joseph Ryan Date: Mon, 2 Oct 2023 16:50:23 -0700 Subject: [PATCH] bootstrap: make copying linker binaries conditional --- src/bootstrap/compile.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index daf0798357b87..ceb2d8ce2b35d 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -161,13 +161,13 @@ impl Step for Std { // The LLD wrappers and `rust-lld` are self-contained linking components that can be // necessary to link the stdlib on some targets. We'll also need to copy these binaries to // the `stage0-sysroot` to ensure the linker is found when bootstrapping on such a target. - if compiler.stage == 0 && compiler.host == builder.config.build { + if compiler.stage == 0 && compiler.host == builder.config.build && builder.config.use_lld { // We want to copy the host `bin` folder within the `rustlib` folder in the sysroot. let src_sysroot_bin = builder .rustc_snapshot_sysroot() .join("lib") .join("rustlib") - .join(&compiler.host.triple) + .join(compiler.host.triple) .join("bin"); let target_sysroot_bin = builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");