File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
compiler/rustc_target/src Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -803,14 +803,16 @@ impl Target {
803803 // the use of soft-float, so all we can do here is some crude hacks.
804804 match & * self . abi {
805805 "softfloat" => {
806- // This is not fully correct, LLVM actually doesn't let us enforce the softfloat
807- // ABI properly... see <https://github.com/rust-lang/rust/issues/134375>.
808- // FIXME: should we forbid "neon" here? But that would be a breaking change.
809- NOTHING
806+ // LLVM will use float registers when `fp-armv8` is available, e.g. for
807+ // calls to built-ins. The only way to ensure a consistent softfloat ABI
808+ // on aarch64 is to never enable `fp-armv8`, so we enforce that.
809+ // In Rust we tie `neon` and `fp-armv8` together, therefore `neon` is the
810+ // feature we have to mark as incompatible.
811+ FeatureConstraints { required : & [ ] , incompatible : & [ "neon" ] }
810812 }
811813 _ => {
812814 // Everything else is assumed to use a hardfloat ABI. neon and fp-armv8 must be enabled.
813- // These are Rust feature names and we use "neon" to control both of them .
815+ // The return value uses are Rust feature names, hence only "neon" shows up .
814816 FeatureConstraints { required : & [ "neon" ] , incompatible : & [ ] }
815817 }
816818 }
You can’t perform that action at this time.
0 commit comments