about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/write.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-16 06:33:50 +0000
committerbors <bors@rust-lang.org>2024-09-16 06:33:50 +0000
commita0f57d87aa71e5334253541327119bb2475ec577 (patch)
treea29d141f732c4873fa081a5e908e5703631106e0 /compiler/rustc_codegen_llvm/src/back/write.rs
parent7d8ee712743ae301730fd9228b22e3c913768022 (diff)
parent5b8a18f9592c84569461dbb6e6638075c9ed826f (diff)
downloadrust-a0f57d87aa71e5334253541327119bb2475ec577.tar.gz
rust-a0f57d87aa71e5334253541327119bb2475ec577.zip
Auto merge of #3892 - rust-lang:rustup-2024-09-16, r=RalfJung
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index a5c27d2282e..b1b692cc027 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -185,7 +185,13 @@ pub(crate) fn target_machine_factory(
     let reloc_model = to_llvm_relocation_model(sess.relocation_model());
 
     let (opt_level, _) = to_llvm_opt_settings(optlvl);
-    let use_softfp = sess.opts.cg.soft_float;
+    let use_softfp = if sess.target.arch == "arm" && sess.target.abi == "eabihf" {
+        sess.opts.cg.soft_float
+    } else {
+        // `validate_commandline_args_with_session_available` has already warned about this being ignored.
+        // Let's make sure LLVM doesn't suddenly start using this flag on more targets.
+        false
+    };
 
     let ffunction_sections =
         sess.opts.unstable_opts.function_sections.unwrap_or(sess.target.function_sections);