From cf5521b5a3e5b9b73cbda6a75b29108bc63da88a Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 1 Feb 2025 17:17:37 +0000 Subject: [PATCH] Enable x87 target feature on x86_64 --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index dc5d80e7a345..35ad67ee8854 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -183,8 +183,8 @@ impl CodegenBackend for CraneliftCodegenBackend { ) -> Vec { // FIXME return the actually used target features. this is necessary for #[cfg(target_feature)] if sess.target.arch == "x86_64" && sess.target.os != "none" { - // x86_64 mandates SSE2 support - vec![sym::fsxr, sym::sse, sym::sse2] + // x86_64 mandates SSE2 support and rustc requires the x87 feature to be enabled + vec![sym::fsxr, sym::sse, sym::sse2, Symbol::intern("x87")] } else if sess.target.arch == "aarch64" { match &*sess.target.os { "none" => vec![],