diff options
| author | Ralf Jung <post@ralfj.de> | 2024-12-29 11:10:36 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-12-29 11:10:36 +0100 |
| commit | 62bb35ab5d99dc0b7d6cc77687b09e94ccd228c6 (patch) | |
| tree | 25f09e17672a7ee2658a0895aa5a87c3b490519f | |
| parent | fd19773d2f8a070dc03f0072f9bc41a65fd04fed (diff) | |
| download | rust-62bb35ab5d99dc0b7d6cc77687b09e94ccd228c6.tar.gz rust-62bb35ab5d99dc0b7d6cc77687b09e94ccd228c6.zip | |
make -Csoft-float have an effect on all ARM targets
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/write.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index 45294ea35b1..ae5e818d86f 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -189,7 +189,7 @@ 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 = if sess.target.arch == "arm" && sess.target.abi == "eabihf" { + let use_softfp = if sess.target.arch == "arm" { sess.opts.cg.soft_float } else { // `validate_commandline_args_with_session_available` has already warned about this being diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 54bb4622963..60f1154dc6d 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -1320,7 +1320,7 @@ fn validate_commandline_args_with_session_available(sess: &Session) { } if sess.opts.cg.soft_float { - if sess.target.arch == "arm" && sess.target.abi == "eabihf" { + if sess.target.arch == "arm" { sess.dcx().emit_warn(errors::SoftFloatDeprecated); } else { // All `use_softfp` does is the equivalent of `-mfloat-abi` in GCC/clang, which only exists on ARM targets. |
