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.
This commit is contained in:
parent
916a0b3225
commit
0e8e9b3887
4 changed files with 4 additions and 11 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue