@@ -2,8 +2,8 @@ use std::borrow::Cow;
22use std:: env;
33
44use crate :: spec:: {
5- Cc , DebuginfoKind , FloatAbi , FramePointer , LinkerFlavor , Lld , SplitDebuginfo , StackProbeType ,
6- StaticCow , TargetOptions , cvs,
5+ Cc , DebuginfoKind , FloatAbi , FramePointer , LinkerFlavor , Lld , RustcAbi , SplitDebuginfo ,
6+ StackProbeType , StaticCow , TargetOptions , cvs,
77} ;
88
99#[ cfg( test) ]
@@ -103,7 +103,7 @@ pub(crate) fn base(
103103 arch : Arch ,
104104 abi : TargetAbi ,
105105) -> ( TargetOptions , StaticCow < str > , StaticCow < str > ) {
106- let opts = TargetOptions {
106+ let mut opts = TargetOptions {
107107 abi : abi. target_abi ( ) . into ( ) ,
108108 llvm_floatabi : Some ( FloatAbi :: Hard ) ,
109109 os : os. into ( ) ,
@@ -154,6 +154,10 @@ pub(crate) fn base(
154154
155155 ..Default :: default ( )
156156 } ;
157+ if matches ! ( arch, Arch :: I386 | Arch :: I686 ) {
158+ // All Apple x86-32 targets have SSE2.
159+ opts. rustc_abi = Some ( RustcAbi :: X86Sse2 ) ;
160+ }
157161 ( opts, unversioned_llvm_target ( os, arch, abi) , arch. target_arch ( ) )
158162}
159163
0 commit comments