[libcxx-commits] [libcxxabi] [libcxxabi] declare __gnu_unwind_frame when not using libunwind (PR #189280)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 29 12:56:29 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxxabi
Author: Andrew Marshall (planetmarshall)
<details>
<summary>Changes</summary>
#<!-- -->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.
---
Full diff: https://github.com/llvm/llvm-project/pull/189280.diff
1 Files Affected:
- (modified) libcxxabi/src/cxa_personality.cpp (+5)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/189280
More information about the libcxx-commits
mailing list