[libcxx-commits] [libcxx] [libc++][NFC] Refactor _LIBCPP_AVAILABILITY_HAS_* macros to always be defined (PR #71002)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 29 05:38:42 PST 2024
philnik777 wrote:
> It's not about back-porting, it's an abi break in libc++18. when building user code with libc++17, `_LIBCPP_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1` is not defined unless targeting `_LIBCPP_ABI_VERSION >= 2`, but libc++18 doesn't check `_LIBCPP_ABI_VERSION`, and there is no way to disable `extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ifstream<char>`. The break comes from https://reviews.llvm.org/D154796
It's not an ABI break. Programs compiled against older libc++ version still work just fine with the dylib from libc++18. Programs compiled against a newer version of libc++ assume that symbols are available that aren't in older dylibs, which makes it a matter of availability (i.e. back-porting), not ABI.
https://github.com/llvm/llvm-project/pull/71002
More information about the libcxx-commits
mailing list