diff options
| author | Markus Mützel <markus.muetzel@gmx.de> | 2023-10-26 14:30:11 +0200 |
|---|---|---|
| committer | Markus Mützel <markus.muetzel@gmx.de> | 2023-10-26 14:30:11 +0200 |
| commit | ce6b9b3b58b6c9e51d87084c916fa7aef81401f1 (patch) | |
| tree | 1ec07de90488c9704b92aac8d3639a2eaaef421b /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | bb2b7530adc87dabc782141573ca063b1b76ce9e (diff) | |
[flang][runtime] Avoid dependency on libc++ for `std::__libcpp_verbose_abort`
Changes in libc++ during the development cycle for LLVM 17 lead to the FortranRuntime library depending on libc++.
Trying to build with Flang 17 that was built with clang++ 17 and libc++ 17 (on MinGW) leads to the following linker error:
ld.lld: error: undefined symbol: std::__1::__libcpp_verbose_abort(char const*, ...)
>>> referenced by libFortranRuntime.a(io-api.cpp.obj):(std::__1::__throw_bad_variant_access[abi:v170000]())
>>> referenced by libFortranRuntime.a(io-stmt.cpp.obj)
>>> referenced by libFortranRuntime.a(unit.cpp.obj)
That might be caused by std::get being called on a std::variant in common::visit.
std::__libcpp_verbose_abort is a weak symbol in libc++ that can be optionally replaced by an alternative definition in user code (see: [1])
Do that to avoid a dependency of the FortranRuntime on libc++.
[1]: https://libcxx.llvm.org/UsingLibcxx.html#overriding-the-default-termination-handler
See also: https://github.com/msys2/MINGW-packages/pull/18002#issuecomment-1694412640
Differential Revision: https://reviews.llvm.org/D158957
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
