[libcxx-commits] [libcxx] [libc++][NFC] Refactor _LIBCPP_AVAILABILITY_HAS_* macros to always be defined (PR #71002)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 29 05:59:50 PST 2024
wang-bin 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.
So how can I build with the libc++ and run on old systems? distribute apps with the latest libc++? AFAIK these changes don't break apple OSes, it's better to provide an option to not break linux too.
https://github.com/llvm/llvm-project/pull/71002
More information about the libcxx-commits
mailing list