[libcxx-commits] [libcxxabi] [libcxxabi] declare __gnu_unwind_frame when not using libunwind (PR #189280)
Andrew Marshall via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 29 12:55:44 PDT 2026
https://github.com/planetmarshall created https://github.com/llvm/llvm-project/pull/189280
#116261 removed the declaration of `__gnu_unwind_frame` and moved it to libunwind, however libunwind is not a required component for libcxxabi. Specifically, this does not compile when libunwind is configured as part of llvm-libgcc where we must have `LIBCXXABI_USE_LLVM_UNWINDER=OFF`
This PR restores the declaration of `__gnu_unwind_frame` when `_LIBUNWIND_VERSION` is not defined.
>From 25097636e850c6af3ea39e631022a2df0e18a248 Mon Sep 17 00:00:00 2001
From: Andrew Marshall <planetmarshalluk at gmail.com>
Date: Sun, 29 Mar 2026 20:49:33 +0100
Subject: [PATCH] [libcxxabi] declare __gnu_unwind_frame when not using
libunwind
---
libcxxabi/src/cxa_personality.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index 35f4e38077248..70c8e474c78a6 100644
--- a/libcxxabi/src/cxa_personality.cpp
+++ b/libcxxabi/src/cxa_personality.cpp
@@ -1116,6 +1116,11 @@ __gxx_personality_seh0(PEXCEPTION_RECORD ms_exc, void *this_frame,
#else
+#if !defined(_LIBUNWIND_VERSION)
+extern "C" _Unwind_Reason_Code __gnu_unwind_frame(_Unwind_Exception*,
+ _Unwind_Context*);
+#endif
+
// Helper function to unwind one frame.
// ARM EHABI 7.3 and 7.4: If the personality function returns _URC_CONTINUE_UNWIND, the
// personality routine should update the virtual register set (VRS) according to the
More information about the libcxx-commits
mailing list