[libcxx-commits] [libcxx] Make __libcpp_verbose_abort() noexcept like std::terminate() (PR #109151)

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 21 12:22:48 PDT 2024


mstorsjo wrote:

> > @dougsonos this breaks flang compilation because flang overrides [this symbol](https://github.com/llvm/llvm-project/blob/af90e7c5161de9a36af768dd5c9d73464e0eed64/flang/runtime/io-api-minimal.cpp#L153) and doesn't use `noexcept` attribute
> 
> In fact, we want to move away from supporting overriding that function. The way of customizing the assertion handler is when configuring the library, as explained here: https://libcxx.llvm.org/Hardening.html#overriding-the-assertion-failure-handler

@ldionne - The issue here from the Flang perspective, is not that flang want to override the function, they don't really care. The thing is that Flang uses some classes from the C++ standard library (from `std::variant` iirc) but don't want to link against the C++ standard library. When using the libc++ implementation of `std::variant`, they end up with undefined references to `std::__libcpp_verbose_abort` unless they actually override/provide it themselves.

https://github.com/llvm/llvm-project/pull/109151


More information about the libcxx-commits mailing list