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 @@ -1663,6 +1663,16 @@ impl Build {
1663
1663
family. add_force_frame_pointer ( cmd) ;
1664
1664
}
1665
1665
1666
+ if !cmd. is_like_msvc ( ) {
1667
+ if target. contains ( "i686" ) || target. contains ( "i586" ) {
1668
+ cmd. args . push ( "-m32" . into ( ) ) ;
1669
+ } else if target == "x86_64-unknown-linux-gnux32" {
1670
+ cmd. args . push ( "-mx32" . into ( ) ) ;
1671
+ } else if target. contains ( "x86_64" ) || target. contains ( "powerpc64" ) {
1672
+ cmd. args . push ( "-m64" . into ( ) ) ;
1673
+ }
1674
+ }
1675
+
1666
1676
// Target flags
1667
1677
match cmd. family {
1668
1678
ToolFamily :: Clang => {
@@ -1792,14 +1802,6 @@ impl Build {
1792
1802
}
1793
1803
}
1794
1804
ToolFamily :: Gnu => {
1795
- if target. contains ( "i686" ) || target. contains ( "i586" ) {
1796
- cmd. args . push ( "-m32" . into ( ) ) ;
1797
- } else if target == "x86_64-unknown-linux-gnux32" {
1798
- cmd. args . push ( "-mx32" . into ( ) ) ;
1799
- } else if target. contains ( "x86_64" ) || target. contains ( "powerpc64" ) {
1800
- cmd. args . push ( "-m64" . into ( ) ) ;
1801
- }
1802
-
1803
1805
if target. contains ( "darwin" ) {
1804
1806
if let Some ( arch) = map_darwin_target_from_rust_to_compiler_architecture ( target)
1805
1807
{
You can’t perform that action at this time.
0 commit comments