--- a/flang/runtime/io-api.cpp +++ b/flang/runtime/io-api.cpp @@ -1495,8 +1495,14 @@ #if defined(_LIBCPP_VERBOSE_ABORT) // Provide own definition for `std::__libcpp_verbose_abort` to avoid dependency // on the version provided by libc++. - -void std::__libcpp_verbose_abort(char const *format, ...) { +#ifndef _LIBCPP_VERBOSE_ABORT_NOEXCEPT +# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 260000 +# define _LIBCPP_VERBOSE_ABORT_NOEXCEPT _NOEXCEPT +# else +# define _LIBCPP_VERBOSE_ABORT_NOEXCEPT +# endif +#endif +void std::__libcpp_verbose_abort(char const *format, ...) _LIBCPP_VERBOSE_ABORT_NOEXCEPT { va_list list; va_start(list, format); std::vfprintf(stderr, format, list);