This moves classes derived from std::exception which have what() member function from libc++ to litc++abi. In addition of moving it also drops __1 namespace from bad_weak_ptr class.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Isn't this an abi break?
We will end up with undefined symbols when using libsupc++/libcxxrt?
nm --demangle /usr/lib/gcc/x86_64-linux-gnu/12/libsupc++.a | grep what nm: atexit_arm.o: no symbols 0000000000000000 T std::bad_alloc::what() const 0000000000000000 T std::bad_array_length::what() const 0000000000000000 T std::bad_array_new_length::what() const 0000000000000000 T std::bad_cast::what() const 0000000000000000 T std::bad_typeid::what() const 0000000000000000 W __gnu_cxx::__concurrence_lock_error::what() const 0000000000000000 W __gnu_cxx::__concurrence_unlock_error::what() const 0000000000000000 T transaction clone for std::bad_exception::what() const 0000000000000000 T transaction clone for std::exception::what() const 0000000000000000 T std::bad_exception::what() const 0000000000000000 T std::exception::what() const
- Move several exception derived classes to c++abi library
- Remove _LIBCPP_EXCEPTION_ABI from classes those symbols are moved to c++abi.
libcxxabi/src/exceptions.cpp | ||
---|---|---|
26 | These really are not part of the ABI: https://itanium-cxx-abi.github.io/cxx-abi/abi.html. This makes it harder to combine libc++ with an alternative ABI implementation (e.g. libsupc++ or libcxxrt). Additionally, libc++ can be built with vcruntime and does not use libc++abi on Windows, so this will result in breaking the Window support. |
libcxxabi/src/exceptions.cpp | ||
---|---|---|
26 | Is vcruntime officially supported? It's not listed in https://releases.llvm.org/3.8.0/projects/libcxx/docs/BuildingLibcxx.html#abi-library-specific-options. I will rely on @ldionne and @EricWF to help out since the original solution was shot down and they proposed to move those symbols to abi. I'm not sure if an alternative ABI implementations were considered or how to address the removal of symbols from libcxx and make them available in libcxxabi. |
These really are not part of the ABI: https://itanium-cxx-abi.github.io/cxx-abi/abi.html. This makes it harder to combine libc++ with an alternative ABI implementation (e.g. libsupc++ or libcxxrt). Additionally, libc++ can be built with vcruntime and does not use libc++abi on Windows, so this will result in breaking the Window support.