Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash when building with _GLIBCXX_USE_CXX11_ABI=0 (#686)
**Issue:** A user had been building aws-crt-cpp with `CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0`, and that worked fine until the recent change where we started hiding symbols by default (PR #666) With symbols hidden by default, and `_GLIBCXX_USE_CXX11_ABI=0`, tests would crash in the destructor of `Aws::Crt::String` (which is `std::string` with a custom allocator). **Description of changes:** Don't hide symbols when building for the ancient glibcxx ABI. I don't 100% understand why this fixes the issue, but the situation is esoteric enough that it doesn't seem worth spending more days on this problem. **Background** See: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html GCC had to introduce a new ABI for C++11 which removed the copy-on-write optimization for strings, which is forbidden in C++11 and later (new ABI uses a small-string optimization instead). But GCC let users manually set `_GLIBCXX_USE_CXX11_ABI=0` so they could opt back into the old ABI and continue working with libraries compiled for C++03. I don't think GCC intended devs to continue using this 10 years later, but some people are, because the old copy-on-write optimization has less memory usage.
- Loading branch information