Skip to content

Commit 5453619

Browse files
dbabokinaneshlya
authored andcommitted
Fix for ispc#3071 - inconsistent __libcpp_verbose_abort definition
1 parent 7d63030 commit 5453619

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/util.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,14 @@
4545

4646
#ifdef _LIBCPP_VERSION
4747
#if ISPC_LLVM_VERSION >= ISPC_LLVM_17_0
48-
// Provide own definition of std::__libcpp_verbose_abort to avoid missing
49-
// symbols error in macOS builds.
50-
// See https://libcxx.llvm.org/UsingLibcxx.html#overriding-the-default-termination-handler
51-
// It is not quite clear why and where this symbol is used.
52-
void std::__libcpp_verbose_abort(char const *format, ...) {
48+
// Provide own definition of std::__libcpp_verbose_abort to avoid missing symbols error on macOS with old
49+
// system libc++.1.dylib. The symbol is there for macOS 13 Ventura and later, but not macOS 12 and earlier.
50+
// See #3071 for more details.
51+
void std::__libcpp_verbose_abort(char const *format, ...)
52+
#if ISPC_LLVM_VERSION >= ISPC_LLVM_20_0
53+
noexcept
54+
#endif
55+
{
5356
va_list list;
5457
va_start(list, format);
5558
vfprintf(stderr, format, list);

0 commit comments

Comments
 (0)