Skip to content

Commit cf5521b

Browse files
committed
Enable x87 target feature on x86_64
1 parent c8f0f36 commit cf5521b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ impl CodegenBackend for CraneliftCodegenBackend {
183183
) -> Vec<rustc_span::Symbol> {
184184
// FIXME return the actually used target features. this is necessary for #[cfg(target_feature)]
185185
if sess.target.arch == "x86_64" && sess.target.os != "none" {
186-
// x86_64 mandates SSE2 support
187-
vec![sym::fsxr, sym::sse, sym::sse2]
186+
// x86_64 mandates SSE2 support and rustc requires the x87 feature to be enabled
187+
vec![sym::fsxr, sym::sse, sym::sse2, Symbol::intern("x87")]
188188
} else if sess.target.arch == "aarch64" {
189189
match &*sess.target.os {
190190
"none" => vec![],

0 commit comments

Comments
 (0)