diff options
| author | Ralf Jung <post@ralfj.de> | 2024-09-03 10:49:16 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-09-03 12:19:50 +0200 |
| commit | df38e644ce24510f948fff3a0977087155ac4b08 (patch) | |
| tree | 50ae78ca6b5d46f761a12d9909e8beb3785a68d2 /compiler/rustc_codegen_llvm/src | |
| parent | 9b82580c7347f800c2550e6719e4218a60a80b28 (diff) | |
| download | rust-df38e644ce24510f948fff3a0977087155ac4b08.tar.gz rust-df38e644ce24510f948fff3a0977087155ac4b08.zip | |
deprecate -Csoft-float because it is unsound (and not fixable)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/write.rs | 8 |
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); |
