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 @@ -1808,6 +1808,16 @@ impl Build {
1808
1808
family. add_force_frame_pointer ( cmd) ;
1809
1809
}
1810
1810
1811
+ if !cmd. is_like_msvc ( ) {
1812
+ if target. contains ( "i686" ) || target. contains ( "i586" ) {
1813
+ cmd. args . push ( "-m32" . into ( ) ) ;
1814
+ } else if target == "x86_64-unknown-linux-gnux32" {
1815
+ cmd. args . push ( "-mx32" . into ( ) ) ;
1816
+ } else if target. contains ( "x86_64" ) || target. contains ( "powerpc64" ) {
1817
+ cmd. args . push ( "-m64" . into ( ) ) ;
1818
+ }
1819
+ }
1820
+
1811
1821
// Target flags
1812
1822
match cmd. family {
1813
1823
ToolFamily :: Clang => {
@@ -1937,14 +1947,6 @@ impl Build {
1937
1947
}
1938
1948
}
1939
1949
ToolFamily :: Gnu => {
1940
- if target. contains ( "i686" ) || target. contains ( "i586" ) {
1941
- cmd. args . push ( "-m32" . into ( ) ) ;
1942
- } else if target == "x86_64-unknown-linux-gnux32" {
1943
- cmd. args . push ( "-mx32" . into ( ) ) ;
1944
- } else if target. contains ( "x86_64" ) || target. contains ( "powerpc64" ) {
1945
- cmd. args . push ( "-m64" . into ( ) ) ;
1946
- }
1947
-
1948
1950
if target. contains ( "darwin" ) {
1949
1951
if let Some ( arch) = map_darwin_target_from_rust_to_compiler_architecture ( target)
1950
1952
{
You can’t perform that action at this time.
0 commit comments