File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 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 {
1717 let mut late_link_args = LinkArgs :: new ( ) ;
1818 let mut late_link_args_dynamic = LinkArgs :: new ( ) ;
1919 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.
2022 late_link_args. insert (
2123 LinkerFlavor :: Gcc ,
2224 vec ! [
@@ -27,10 +29,9 @@ pub fn opts() -> TargetOptions {
2729 // And it seems that the linker fails to use import symbols from msvcrt
2830 // that are required from functions in msvcrt in certain cases. For example
2931 // `_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.
3233 //
33- // See https://github.com/rust-lang/rust/pull/47483
34+ // See https://github.com/rust-lang/rust/pull/47483 for some more details.
3435 "-lmsvcrt" . to_string( ) ,
3536 "-luser32" . to_string( ) ,
3637 "-lkernel32" . to_string( ) ,
You can’t perform that action at this time.
0 commit comments