Skip to content

Commit cab3ea9

Browse files
committed
Auto merge of rust-lang#134885 - RalfJung:arm-soft-float, r=workingjubilee
make -Csoft-float have an effect on all ARM targets See the discussion [on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/187780-t-compiler.2Fwg-llvm/topic/Softfloat.20ABI.2C.20hardfloat.20instructions): apparently `-float-abi=soft` is how one can force "use soffloat ABI but hardware FP instructions" on ARM-32. Our version of that is `-Csoft-float` but I made that one a NOP on all targets except for ARM eabihf (see rust-lang#129897)... which now make experimentation on what we actually want to do here a lot harder. So, let's unlock the flag on all ARM targets while we are still figuring out our long-term plans here. Cc `@workingjubilee`
2 parents c156614 + 62bb35a commit cab3ea9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ pub(crate) fn target_machine_factory(
189189
let reloc_model = to_llvm_relocation_model(sess.relocation_model());
190190

191191
let (opt_level, _) = to_llvm_opt_settings(optlvl);
192-
let use_softfp = if sess.target.arch == "arm" && sess.target.abi == "eabihf" {
192+
let use_softfp = if sess.target.arch == "arm" {
193193
sess.opts.cg.soft_float
194194
} else {
195195
// `validate_commandline_args_with_session_available` has already warned about this being

compiler/rustc_session/src/session.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
13201320
}
13211321

13221322
if sess.opts.cg.soft_float {
1323-
if sess.target.arch == "arm" && sess.target.abi == "eabihf" {
1323+
if sess.target.arch == "arm" {
13241324
sess.dcx().emit_warn(errors::SoftFloatDeprecated);
13251325
} else {
13261326
// All `use_softfp` does is the equivalent of `-mfloat-abi` in GCC/clang, which only exists on ARM targets.

0 commit comments

Comments
 (0)