File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1642,6 +1642,13 @@ impl Build {
16421642 cmd. push_opt_unless_duplicate ( format ! ( "-O{}" , opt_level) . into ( ) ) ;
16431643 }
16441644
1645+ if cmd. family == ToolFamily :: Clang && target. contains ( "windows" ) {
1646+ // Disambiguate mingw and msvc on Windows. Problem is that
1647+ // depending on the origin clang can default to a mismatchig
1648+ // run-time.
1649+ cmd. push_cc_arg ( format ! ( "--target={}" , target) . into ( ) ) ;
1650+ }
1651+
16451652 if cmd. family == ToolFamily :: Clang && target. contains ( "android" ) {
16461653 // For compatibility with code that doesn't use pre-defined `__ANDROID__` macro.
16471654 // If compiler used via ndk-build or cmake (officially supported build methods)
@@ -2575,6 +2582,10 @@ impl Build {
25752582 }
25762583 }
25772584
2585+ if target. contains ( "msvc" ) && tool. family == ToolFamily :: Gnu {
2586+ println ! ( "cargo:warning=GNU compiler is not supported for this target" ) ;
2587+ }
2588+
25782589 Ok ( tool)
25792590 }
25802591
You can’t perform that action at this time.
0 commit comments