From e237e0280b301457e5cc4bf6d559e91373a17d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Tue, 9 Jun 2020 23:57:16 +0200 Subject: [PATCH] Reoder order in which MinGW libs are linked --- src/librustc_target/spec/windows_gnu_base.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_target/spec/windows_gnu_base.rs b/src/librustc_target/spec/windows_gnu_base.rs index f556bf03f02..744f26239ca 100644 --- a/src/librustc_target/spec/windows_gnu_base.rs +++ b/src/librustc_target/spec/windows_gnu_base.rs @@ -20,9 +20,9 @@ pub fn opts() -> TargetOptions { late_link_args.insert( LinkerFlavor::Gcc, vec![ + "-lmsvcrt".to_string(), "-lmingwex".to_string(), "-lmingw32".to_string(), - "-lmsvcrt".to_string(), // mingw's msvcrt is a weird hybrid import library and static library. // And it seems that the linker fails to use import symbols from msvcrt // that are required from functions in msvcrt in certain cases. For example