[libcxx-commits] [libcxx] [libc++] Properly implement array cookies in the ARM ABI (PR #160182)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 8 05:28:22 PDT 2025


================
@@ -30,8 +30,20 @@
 #elif _LIBCPP_ABI_FORCE_MICROSOFT
 #  define _LIBCPP_ABI_MICROSOFT
 #else
+// Windows uses the Microsoft ABI
 #  if defined(_WIN32) && defined(_MSC_VER)
 #    define _LIBCPP_ABI_MICROSOFT
+
+// 32-bit ARM uses the ARM ABI with a few oddities (array cookies, etc),
+// and so does 64-bit ARM on Apple platforms.
+#  elif defined(__arm__) || (defined(__APPLE__) && defined(__aarch64__))
+#    define _LIBCPP_ABI_ARM_WITH_32BIT_ODDITIES
----------------
philnik777 wrote:

Yeah, that's better.

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


More information about the libcxx-commits mailing list