[llvm] [AArch64] Make IFUNC opt-in rather than opt-out. (PR #171648)

Harald van Dijk via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 20:07:17 PST 2025


================
@@ -2402,11 +2402,9 @@ static bool targetSupportsIRelativeRelocation(const Triple &TT) {
   if (!TT.isOSBinFormatELF())
     return false;
 
-  // musl doesn't support IFUNCs.
-  if (TT.isMusl())
-    return false;
-
-  return true;
+  // IFUNCs are supported on glibc, bionic, and some but not all of the BSDs.
+  return TT.isOSGlibc() || TT.isAndroid() || TT.isOSFreeBSD() ||
+         TT.isOSDragonFly() || TT.isOSNetBSD();
 }
 
 // Emit an ifunc resolver that returns a signed pointer to the specified target,
----------------
hvdijk wrote:

Done, thanks, that cleans up the code a bit more.

https://github.com/llvm/llvm-project/pull/171648


More information about the llvm-commits mailing list