diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index aade1ddc69da..937f0d1b8a07 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -462,8 +462,11 @@ impl Step for Rustc { let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin"); let rust_lld = exe("rust-lld", compiler.host); builder.copy_link(&src_dir.join(&rust_lld), &dst_dir.join(&rust_lld)); - let self_contained_lld_src_dir = src_dir.join("gcc-ld"); - let self_contained_lld_dst_dir = dst_dir.join("gcc-ld"); + + let gcc_ld = exe("gcc-ld", compiler.host); + let self_contained_lld_src_dir = src_dir.join(&gcc_ld); + let self_contained_lld_dst_dir = dst_dir.join(gcc_ld); + t!(fs::create_dir(&self_contained_lld_dst_dir)); for name in crate::LLD_FILE_NAMES { let exe_name = exe(name, compiler.host);