File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ pub fn opts() -> TargetOptions {
17
17
let mut late_link_args = LinkArgs :: new ( ) ;
18
18
let mut late_link_args_dynamic = LinkArgs :: new ( ) ;
19
19
let mut late_link_args_static = LinkArgs :: new ( ) ;
20
+ // Order of `late_link_args*` was found through trial and error to work with various
21
+ // mingw-w64 versions (not tested on the CI). It's expected to change from time to time.
20
22
late_link_args. insert (
21
23
LinkerFlavor :: Gcc ,
22
24
vec ! [
@@ -27,10 +29,9 @@ pub fn opts() -> TargetOptions {
27
29
// And it seems that the linker fails to use import symbols from msvcrt
28
30
// that are required from functions in msvcrt in certain cases. For example
29
31
// `_fmode` that is used by an implementation of `__p__fmode` in x86_64.
30
- // Listing the library twice seems to fix that, and seems to also be done
31
- // by mingw's gcc (Though not sure if it's done on purpose, or by mistake).
32
+ // The library is purposely listed twice to fix that.
32
33
//
33
- // See https://github.com/rust-lang/rust/pull/47483
34
+ // See https://github.com/rust-lang/rust/pull/47483 for some more details.
34
35
"-lmsvcrt" . to_string( ) ,
35
36
"-luser32" . to_string( ) ,
36
37
"-lkernel32" . to_string( ) ,
You can’t perform that action at this time.
0 commit comments