diff --git a/flang/runtime/io-api.cpp b/flang/runtime/io-api.cpp --- a/flang/runtime/io-api.cpp +++ b/flang/runtime/io-api.cpp @@ -1517,3 +1517,17 @@ #endif } // namespace Fortran::runtime::io + +#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, ...) { + va_list list; + va_start(list, format); + std::vfprintf(stderr, format, list); + va_end(list); + + std::abort(); +} +#endif