Skip to content

Commit 2a6fa9d

Browse files
committed
Fix __libcpp_verbose_abort signature for Xcode 16
1 parent 84bd239 commit 2a6fa9d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

testing/sample_framework/src/app_framework.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,23 @@
2727
#include <ctime>
2828

2929
#if defined(__APPLE__)
30+
#include <TargetConditionals.h>
3031
// Workaround for Xcode 15 / Swift 5.10 Concurrency and C++ verbose abort
3132
// crash on older iOS versions (iOS 15/16).
3233
// By providing these symbols in our own binary, we prevent dyld from
3334
// crashing when they are missing from the system libraries on older OSs.
35+
36+
// In Xcode 16, libc++ removed the noexcept specifier from __libcpp_verbose_abort.
37+
#if defined(__apple_build_version__) && __apple_build_version__ >= 16000000 && __apple_build_version__ < 20000000
38+
#define FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT
39+
#else
40+
#define FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT noexcept
41+
#endif
42+
3443
namespace std {
3544
inline namespace __1 {
3645
__attribute__((weak)) void __libcpp_verbose_abort(const char* format,
37-
...) noexcept {
46+
...) FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT {
3847
va_list list;
3948
va_start(list, format);
4049
vfprintf(stderr, format, list);

0 commit comments

Comments
 (0)