File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1563,6 +1563,16 @@ impl Build {
1563
1563
family. add_force_frame_pointer ( cmd) ;
1564
1564
}
1565
1565
1566
+ if !cmd. is_like_msvc ( ) {
1567
+ if target. contains ( "i686" ) || target. contains ( "i586" ) {
1568
+ cmd. args . push ( "-m32" . into ( ) ) ;
1569
+ } else if target == "x86_64-unknown-linux-gnux32" {
1570
+ cmd. args . push ( "-mx32" . into ( ) ) ;
1571
+ } else if target. contains ( "x86_64" ) || target. contains ( "powerpc64" ) {
1572
+ cmd. args . push ( "-m64" . into ( ) ) ;
1573
+ }
1574
+ }
1575
+
1566
1576
// Target flags
1567
1577
match cmd. family {
1568
1578
ToolFamily :: Clang => {
@@ -1668,14 +1678,6 @@ impl Build {
1668
1678
}
1669
1679
}
1670
1680
ToolFamily :: Gnu => {
1671
- if target. contains ( "i686" ) || target. contains ( "i586" ) {
1672
- cmd. args . push ( "-m32" . into ( ) ) ;
1673
- } else if target == "x86_64-unknown-linux-gnux32" {
1674
- cmd. args . push ( "-mx32" . into ( ) ) ;
1675
- } else if target. contains ( "x86_64" ) || target. contains ( "powerpc64" ) {
1676
- cmd. args . push ( "-m64" . into ( ) ) ;
1677
- }
1678
-
1679
1681
if target. contains ( "darwin" ) {
1680
1682
if let Some ( arch) = map_darwin_target_from_rust_to_compiler_architecture ( target)
1681
1683
{
You can’t perform that action at this time.
0 commit comments