2. Update the ``libcxx/include/__libcpp_version`` file
3. Update the version number in ``libcxx/docs/conf.py``
4. Update ``_LIBCPPABI_VERSION`` in ``libcxxabi/include/cxxabi.h``
+5. Update ``_LIBUNWIND_VERSION`` in ``libunwind/include/__libunwind_config.h``
Exporting new symbols from the library
======================================
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
-# Define LIBCXXABI_USE_LLVM_UNWINDER for conditional compilation.
-if (LIBCXXABI_USE_LLVM_UNWINDER)
- add_definitions(-DLIBCXXABI_USE_LLVM_UNWINDER)
-endif()
-
if (LIBCXXABI_SILENT_TERMINATE)
add_definitions(-DLIBCXXABI_SILENT_TERMINATE)
endif()
#include "private_typeinfo.h"
#include "unwind.h"
+// TODO: This is a temporary workaround for libc++abi to recognize that it's being
+// built against LLVM's libunwind. LLVM's libunwind started reporting _LIBUNWIND_VERSION
+// in LLVM 15 -- we can remove this workaround after shipping LLVM 17. Once we remove
+// this workaround, it won't be possible to build libc++abi against libunwind headers
+// from LLVM 14 and before anymore.
+#if defined(____LIBUNWIND_CONFIG_H__) && !defined(_LIBUNWIND_VERSION)
+# define _LIBUNWIND_VERSION
+#endif
+
#if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__)
#include <windows.h>
#include <winnt.h>
}
// ARM register names
-#if !defined(LIBCXXABI_USE_LLVM_UNWINDER)
+#if !defined(_LIBUNWIND_VERSION)
static const uint32_t REG_UCB = 12; // Register to save _Unwind_Control_Block
#endif
static const uint32_t REG_SP = 13;
bool native_exception = __isOurExceptionClass(unwind_exception);
-#if !defined(LIBCXXABI_USE_LLVM_UNWINDER)
+#if !defined(_LIBUNWIND_VERSION)
// Copy the address of _Unwind_Control_Block to r12 so that
// _Unwind_GetLanguageSpecificData() and _Unwind_GetRegionStart() can
// return correct address.
#ifndef ____LIBUNWIND_CONFIG_H__
#define ____LIBUNWIND_CONFIG_H__
+#define _LIBUNWIND_VERSION 15000
+
#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
!defined(__ARM_DWARF_EH__)
#define _LIBUNWIND_ARM_EHABI