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 {
1642
1642
cmd. push_opt_unless_duplicate ( format ! ( "-O{}" , opt_level) . into ( ) ) ;
1643
1643
}
1644
1644
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
+
1645
1652
if cmd. family == ToolFamily :: Clang && target. contains ( "android" ) {
1646
1653
// For compatibility with code that doesn't use pre-defined `__ANDROID__` macro.
1647
1654
// If compiler used via ndk-build or cmake (officially supported build methods)
@@ -2575,6 +2582,10 @@ impl Build {
2575
2582
}
2576
2583
}
2577
2584
2585
+ if target. contains ( "msvc" ) && tool. family == ToolFamily :: Gnu {
2586
+ println ! ( "cargo:warning=GNU compiler is not supported for this target" ) ;
2587
+ }
2588
+
2578
2589
Ok ( tool)
2579
2590
}
2580
2591
You can’t perform that action at this time.
0 commit comments