1
- diff -urN rustc-1.52.1-src.orig/compiler/rustc_target/src/spec/windows_gnu_base.rs rustc-1.52.1-src/compiler/rustc_target/src/spec/windows_gnu_base.rs
2
- --- rustc-1.52.1-src.orig/compiler/rustc_target/src/spec/windows_gnu_base.rs 2021-05-09 04:52:39.000000000 +0200
3
- +++ rustc-1.52.1-src/compiler/rustc_target/src/spec/windows_gnu_base.rs 2021-06-06 22:12:33.367953300 +0200
4
- @@ -18,34 +18,13 @@
1
+ --- rustc-1.61.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs.orig 2022-05-18 03:29:36.000000000 +0200
2
+ +++ rustc-1.61.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs 2022-05-22 15:53:32.596861100 +0200
3
+ @@ -16,34 +16,13 @@
5
4
],
6
5
);
7
6
@@ -11,53 +10,53 @@ diff -urN rustc-1.52.1-src.orig/compiler/rustc_target/src/spec/windows_gnu_base.
11
10
- // Order of `late_link_args*` was found through trial and error to work with various
12
11
- // mingw-w64 versions (not tested on the CI). It's expected to change from time to time.
13
12
- let mingw_libs = vec![
14
- - "-lmsvcrt".to_string (),
15
- - "-lmingwex".to_string (),
16
- - "-lmingw32".to_string (),
17
- - "-lgcc".to_string (), // alas, mingw* libraries above depend on libgcc
13
+ - "-lmsvcrt".into (),
14
+ - "-lmingwex".into (),
15
+ - "-lmingw32".into (),
16
+ - "-lgcc".into (), // alas, mingw* libraries above depend on libgcc
18
17
- // mingw's msvcrt is a weird hybrid import library and static library.
19
18
- // And it seems that the linker fails to use import symbols from msvcrt
20
19
- // that are required from functions in msvcrt in certain cases. For example
21
20
- // `_fmode` that is used by an implementation of `__p__fmode` in x86_64.
22
21
- // The library is purposely listed twice to fix that.
23
22
- //
24
23
- // See https://github.com/rust-lang/rust/pull/47483 for some more details.
25
- - "-lmsvcrt".to_string (),
26
- - "-luser32".to_string (),
27
- - "-lkernel32".to_string (),
24
+ - "-lmsvcrt".into (),
25
+ - "-luser32".into (),
26
+ - "-lkernel32".into (),
28
27
- ];
29
28
- late_link_args.insert(LinkerFlavor::Gcc, mingw_libs.clone());
30
29
- late_link_args.insert(LinkerFlavor::Lld(LldFlavor::Ld), mingw_libs);
31
30
let dynamic_unwind_libs = vec![
32
31
// If any of our crates are dynamically linked then we need to use
33
32
// the shared libgcc_s-dw2-1.dll. This is required to support
34
33
// unwinding across DLL boundaries.
35
- - "-lgcc_s".to_string (),
36
- + "-l:libunwind.dll.a".to_string (),
34
+ - "-lgcc_s".into (),
35
+ + "-l:libunwind.dll.a".into (),
37
36
];
38
37
late_link_args_dynamic.insert(LinkerFlavor::Gcc, dynamic_unwind_libs.clone());
39
38
late_link_args_dynamic.insert(LinkerFlavor::Lld(LldFlavor::Ld), dynamic_unwind_libs);
40
- @@ -55 ,8 +34 ,7 @@
39
+ @@ -53 ,8 +32 ,7 @@
41
40
// binaries to be redistributed without the libgcc_s-dw2-1.dll
42
41
// dependency, but unfortunately break unwinding across DLL
43
42
// boundaries when unwinding across FFI boundaries.
44
- - "-lgcc_eh".to_string (),
45
- - "-l:libpthread.a".to_string (),
46
- + "-l:libunwind.a".to_string (),
43
+ - "-lgcc_eh".into (),
44
+ - "-l:libpthread.a".into (),
45
+ + "-l:libunwind.a".into (),
47
46
];
48
47
late_link_args_static.insert(LinkerFlavor::Gcc, static_unwind_libs.clone());
49
48
late_link_args_static.insert(LinkerFlavor::Lld(LldFlavor::Ld), static_unwind_libs);
50
- @@ -66 ,7 +44 ,8 @@
51
- env: "gnu".to_string (),
52
- vendor: "pc".to_string (),
49
+ @@ -64 ,7 +42 ,8 @@
50
+ env: "gnu".into (),
51
+ vendor: "pc".into (),
53
52
// FIXME(#13846) this should be enabled for windows
54
53
- function_sections: false,
55
54
+ function_sections: true,
56
55
+ no_default_libraries: false,
57
- linker: Some("gcc".to_string ()),
56
+ linker: Some("gcc".into ()),
58
57
dynamic_linking: true,
59
58
executables: true,
60
- @@ -84 ,7 +63 ,6 @@
59
+ @@ -80 ,7 +59 ,6 @@
61
60
pre_link_objects_fallback: crt_objects::pre_mingw_fallback(),
62
61
post_link_objects_fallback: crt_objects::post_mingw_fallback(),
63
62
crt_objects_fallback: Some(CrtObjectsFallback::Mingw),
@@ -81,25 +80,25 @@ diff -urN rustc-1.53.0-src/src/bootstrap/bootstrap.py.orig rustc-1.53.0-src/src/
81
80
if self.rustfmt() and self.rustfmt().startswith(bin_root) and (
82
81
not os.path.exists(self.rustfmt())
83
82
or self.program_out_of_date(self.rustfmt_stamp(), self.rustfmt_channel)
84
- --- rustc-1.57 .0-src/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs.orig 2022-02-18 14:41:41.509000000 +0100
85
- +++ rustc-1.57 .0-src/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs 2022-02-18 14:41:49.361435000 +0100
83
+ --- rustc-1.61 .0-src/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs.orig 2022-05-22 16:08:33.258876100 +0200
84
+ +++ rustc-1.61 .0-src/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs 2022-05-22 16:13:31.577741200 +0200
86
85
@@ -7,7 +7,7 @@
87
86
.insert(LinkerFlavor::Lld(LldFlavor::Ld), vec!["-m".to_string(), "i386pe".to_string()]);
88
87
base.max_atomic_width = Some(64);
89
88
base.frame_pointer = FramePointer::Always; // Required for backtraces
90
- - base.linker = Some("i686-w64-mingw32-gcc".to_string ());
91
- + base.linker = Some("i686-w64-mingw32-clang".to_string ());
92
-
89
+ - base.linker = Some("i686-w64-mingw32-gcc".into ());
90
+ + base.linker = Some("i686-w64-mingw32-clang".into ());
91
+
93
92
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
94
93
// space available to x86 Windows binaries on x86_64.
95
- --- rustc-1.57 .0-src/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs.orig 2022-02-18 14:41:21.116000000 +0100
96
- +++ rustc-1.57 .0-src/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs 2022-02-18 14:41:24.641880900 +0100
94
+ --- rustc-1.61 .0-src/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs.orig 2022-05-22 16:08:33.258876100 +0200
95
+ +++ rustc-1.61 .0-src/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs 2022-05-22 16:13:31.577741200 +0200
97
96
@@ -10,7 +10,7 @@
98
97
base.pre_link_args
99
- .insert(LinkerFlavor::Lld(LldFlavor::Ld), vec!["-m".to_string (), "i386pep".to_string ()]);
98
+ .insert(LinkerFlavor::Lld(LldFlavor::Ld), vec!["-m".into (), "i386pep".into ()]);
100
99
base.max_atomic_width = Some(64);
101
- - base.linker = Some("x86_64-w64-mingw32-gcc".to_string ());
102
- + base.linker = Some("x86_64-w64-mingw32-clang".to_string ());
100
+ - base.linker = Some("x86_64-w64-mingw32-gcc".into ());
101
+ + base.linker = Some("x86_64-w64-mingw32-clang".into ());
103
102
104
103
Target {
105
- llvm_target: "x86_64-pc-windows-gnu".to_string (),
104
+ llvm_target: "x86_64-pc-windows-gnu".into (),
0 commit comments