File tree Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,7 @@ pub(crate) fn build_sysroot(
33
33
let cg_clif_dylib_path = match cg_clif_dylib_src {
34
34
CodegenBackend :: Local ( src_path) => {
35
35
// Copy the backend
36
- let cg_clif_dylib_path = if cfg ! ( windows) {
37
- // Windows doesn't have rpath support, so the cg_clif dylib needs to be next to the
38
- // binaries.
39
- dist_dir. join ( "bin" )
40
- } else {
41
- dist_dir. join ( "lib" )
42
- }
43
- . join ( src_path. file_name ( ) . unwrap ( ) ) ;
36
+ let cg_clif_dylib_path = dist_dir. join ( "lib" ) . join ( src_path. file_name ( ) . unwrap ( ) ) ;
44
37
try_hard_link ( src_path, & cg_clif_dylib_path) ;
45
38
CodegenBackend :: Local ( cg_clif_dylib_path)
46
39
}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fn main() {
16
16
if let Some ( name) = option_env ! ( "BUILTIN_BACKEND" ) {
17
17
rustflags. push ( format ! ( "-Zcodegen-backend={name}" ) ) ;
18
18
} else {
19
- let dylib = sysroot. join ( if cfg ! ( windows ) { "bin" } else { " lib" } ) . join (
19
+ let dylib = sysroot. join ( " lib") . join (
20
20
env:: consts:: DLL_PREFIX . to_string ( )
21
21
+ "rustc_codegen_cranelift"
22
22
+ env:: consts:: DLL_SUFFIX ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ fn main() {
11
11
sysroot = sysroot. parent ( ) . unwrap ( ) ;
12
12
}
13
13
14
- let cg_clif_dylib_path = sysroot. join ( if cfg ! ( windows ) { "bin" } else { " lib" } ) . join (
14
+ let cg_clif_dylib_path = sysroot. join ( " lib") . join (
15
15
env:: consts:: DLL_PREFIX . to_string ( ) + "rustc_codegen_cranelift" + env:: consts:: DLL_SUFFIX ,
16
16
) ;
17
17
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ fn main() {
11
11
sysroot = sysroot. parent ( ) . unwrap ( ) ;
12
12
}
13
13
14
- let cg_clif_dylib_path = sysroot. join ( if cfg ! ( windows ) { "bin" } else { " lib" } ) . join (
14
+ let cg_clif_dylib_path = sysroot. join ( " lib") . join (
15
15
env:: consts:: DLL_PREFIX . to_string ( ) + "rustc_codegen_cranelift" + env:: consts:: DLL_SUFFIX ,
16
16
) ;
17
17
You can’t perform that action at this time.
0 commit comments