From 12b3dd8a35767e0d73639667ca2d5de93a54389f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Tue, 26 May 2026 19:22:25 +0200 Subject: [PATCH] Limit the additional DLL to Windows 156229 didn't limit the additional DLL copy to Windows as it was supposed to. --- src/bootstrap/src/core/build_steps/dist.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 4bd4fb0834e2..a486cbdf4126 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -2591,8 +2591,10 @@ pub fn maybe_install_llvm_runtime(builder: &Builder<'_>, target: TargetSelection // To workaround lack of rpath on Windows, we bundle another copy of // the LLVM DLL to make rust-lld and llvm-tools work when `sysroot/bin` // is missing from PATH, i.e. when they not launched by rustc. - let dst_libdir = sysroot.join("lib/rustlib").join(target).join("bin"); - maybe_install_llvm(builder, target, &dst_libdir, false); + if target.triple.contains("windows") { + let dst_libdir = sysroot.join("lib/rustlib").join(target).join("bin"); + maybe_install_llvm(builder, target, &dst_libdir, false); + } } }