about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-01-09 10:26:50 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-01-09 10:26:50 +0000
commit0e8e9b38878f1f30f53a7445a752783c7de38583 (patch)
treef88e7247efa625db854bd690919f1c7bda10b63f
parent916a0b322536821ea210905a7dd8294d10d0271b (diff)
downloadrust-0e8e9b38878f1f30f53a7445a752783c7de38583.tar.gz
rust-0e8e9b38878f1f30f53a7445a752783c7de38583.zip
Put rustc_codegen_cranelift.dll in bin rather than lib on Windows
rustc-clif has long been changed from a custom driver linking against
cg_clif to a wrapper around rustc which passes -Zcodegen-backend.
-rw-r--r--build_system/build_sysroot.rs9
-rw-r--r--scripts/cargo-clif.rs2
-rw-r--r--scripts/rustc-clif.rs2
-rw-r--r--scripts/rustdoc-clif.rs2
4 files changed, 4 insertions, 11 deletions
diff --git a/build_system/build_sysroot.rs b/build_system/build_sysroot.rs
index 33759946909..a73e3c87d43 100644
--- a/build_system/build_sysroot.rs
+++ b/build_system/build_sysroot.rs
@@ -33,14 +33,7 @@ pub(crate) fn build_sysroot(
     let cg_clif_dylib_path = match cg_clif_dylib_src {
         CodegenBackend::Local(src_path) => {
             // Copy the backend
-            let cg_clif_dylib_path = if cfg!(windows) {
-                // Windows doesn't have rpath support, so the cg_clif dylib needs to be next to the
-                // binaries.
-                dist_dir.join("bin")
-            } else {
-                dist_dir.join("lib")
-            }
-            .join(src_path.file_name().unwrap());
+            let cg_clif_dylib_path = dist_dir.join("lib").join(src_path.file_name().unwrap());
             try_hard_link(src_path, &cg_clif_dylib_path);
             CodegenBackend::Local(cg_clif_dylib_path)
         }
diff --git a/scripts/cargo-clif.rs b/scripts/cargo-clif.rs
index 1e14f41d4a2..ebbb6879610 100644
--- a/scripts/cargo-clif.rs
+++ b/scripts/cargo-clif.rs
@@ -16,7 +16,7 @@ fn main() {
     if let Some(name) = option_env!("BUILTIN_BACKEND") {
         rustflags.push(format!("-Zcodegen-backend={name}"));
     } else {
-        let dylib = sysroot.join(if cfg!(windows) { "bin" } else { "lib" }).join(
+        let dylib = sysroot.join("lib").join(
             env::consts::DLL_PREFIX.to_string()
                 + "rustc_codegen_cranelift"
                 + env::consts::DLL_SUFFIX,
diff --git a/scripts/rustc-clif.rs b/scripts/rustc-clif.rs
index a27b9983bf1..528031af82a 100644
--- a/scripts/rustc-clif.rs
+++ b/scripts/rustc-clif.rs
@@ -11,7 +11,7 @@ fn main() {
         sysroot = sysroot.parent().unwrap();
     }
 
-    let cg_clif_dylib_path = sysroot.join(if cfg!(windows) { "bin" } else { "lib" }).join(
+    let cg_clif_dylib_path = sysroot.join("lib").join(
         env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,
     );
 
diff --git a/scripts/rustdoc-clif.rs b/scripts/rustdoc-clif.rs
index 1cad312bb79..6ebe060d8bb 100644
--- a/scripts/rustdoc-clif.rs
+++ b/scripts/rustdoc-clif.rs
@@ -11,7 +11,7 @@ fn main() {
         sysroot = sysroot.parent().unwrap();
     }
 
-    let cg_clif_dylib_path = sysroot.join(if cfg!(windows) { "bin" } else { "lib" }).join(
+    let cg_clif_dylib_path = sysroot.join("lib").join(
         env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,
     );