Disable f16 on AArch64 without the neon feature

There is an LLVM regression that breaks some `f16`-related code when
`fp-armv8` is disabled [1]. Since Rust ties that feature to `neon`,
disable `f16` if `neon` is not available.

[1]: https://github.com/llvm/llvm-project/issues/129394
This commit is contained in:
Trevor Gross 2025-03-01 19:32:06 +00:00 committed by Trevor Gross
parent 60ea5815b2
commit afea1c0555

View file

@ -71,6 +71,8 @@ pub fn configure_f16_f128(target: &Target) {
let f16_enabled = match target.arch.as_str() {
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
"arm64ec" => false,
// Crash in LLVM20 <https://github.com/llvm/llvm-project/issues/129394>
"aarch64" if !target.features.iter().any(|f| f == "neon") => false,
// Selection failure <https://github.com/llvm/llvm-project/issues/50374>
"s390x" => false,
// Infinite recursion <https://github.com/llvm/llvm-project/issues/97981>