@@ -2,8 +2,8 @@ use std::borrow::Cow;
2
2
use std:: env;
3
3
4
4
use crate :: spec:: {
5
- Cc , DebuginfoKind , FloatAbi , FramePointer , LinkerFlavor , Lld , SplitDebuginfo , StackProbeType ,
6
- StaticCow , TargetOptions , cvs,
5
+ Cc , DebuginfoKind , FloatAbi , FramePointer , LinkerFlavor , Lld , RustAbi , SplitDebuginfo ,
6
+ StackProbeType , StaticCow , TargetOptions , cvs,
7
7
} ;
8
8
9
9
#[ cfg( test) ]
@@ -103,7 +103,7 @@ pub(crate) fn base(
103
103
arch : Arch ,
104
104
abi : TargetAbi ,
105
105
) -> ( TargetOptions , StaticCow < str > , StaticCow < str > ) {
106
- let opts = TargetOptions {
106
+ let mut opts = TargetOptions {
107
107
abi : abi. target_abi ( ) . into ( ) ,
108
108
llvm_floatabi : Some ( FloatAbi :: Hard ) ,
109
109
os : os. into ( ) ,
@@ -154,6 +154,10 @@ pub(crate) fn base(
154
154
155
155
..Default :: default ( )
156
156
} ;
157
+ if matches ! ( arch, Arch :: I386 | Arch :: I686 ) {
158
+ // All Apple x86-32 targets have SSE2.
159
+ opts. rust_abi = Some ( RustAbi :: X86Sse2 ) ;
160
+ }
157
161
( opts, unversioned_llvm_target ( os, arch, abi) , arch. target_arch ( ) )
158
162
}
159
163
0 commit comments