[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)
Chris Copeland via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 00:23:10 PST 2025
chrisnc wrote:
I've been fairly busy over the past few months so haven't had time to pursue this further. One of the issues is that as far as I can tell, there doesn't seem to be a mechanism to issue a warning from within LLVM codegen, only to error. The behavior you are describing is already what `clang` does, but there isn't a way to just move that into LLVM so it can be easily used. There's also the matter of whether to treat an explicit choice of target that has eabihf as the ABI component in the same way. For this to be generally useful to Rust I think you have to treat the target choice as opting in to that ABI, but that is not the current behavior of the `clang` warning, and there are several test cases invoking the LLVM tools directly that expect the behavior of just not using the same ABI that the target says it should...
My next step was going to experiment with the approach the RISC-V backend uses and see how it goes, especially to evaluate the blast radius in the tests and compare.
https://github.com/llvm/llvm-project/pull/111334
More information about the llvm-commits
mailing list