[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 14 13:59:54 PDT 2024
================
@@ -1505,6 +1505,10 @@ class TargetInfo : public TransferrableTargetInfo,
bool supportsIFunc() const {
if (getTriple().isOSBinFormatMachO())
return true;
+ if (getTriple().isOSWindows() && getTriple().isAArch64())
+ return true;
+ if (getTriple().getArch() == llvm::Triple::ArchType::avr)
----------------
mstorsjo wrote:
I noted the same, but it seems it's intentional.
One of the existing tests use ifuncs for an `avr-unknown-unknown` target (which is OS-less). Previously, ifunc was accepted for any `TargetELFOrMachO`, which I guess was true for `avr-unknown-unknown`. But now it's only accepted for targets that are accepted by the `supportsIFunc()` method, which only accept a few specific OSes on ELF.
On the other hand, it doesn't seem consistent, that for baremetal, ifunc is supported depending on the architecture - but this is needed to keep the existing tests passing at least.
https://github.com/llvm/llvm-project/pull/111962
More information about the cfe-commits
mailing list