[libc++] Re-export libc++abi symbols on Apple platforms when using system-libcxxabi (#77218)

When using LIBCXX_CXX_ABI=system-libcxxabi on Apple platforms, we would not
re-export the libc++abi symbols unlike when LIBCXX_CXX_ABI=libcxxabi. This
was caused by overly strict string matching in CMake.

https://github.com/NixOS/nixpkgs/issues/269548
This commit is contained in:
a-n-n-a-l-e-e 2024-01-11 14:07:11 -08:00 committed by GitHub
parent 7740565f56
commit b3981edb51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,7 +230,7 @@ if (LIBCXX_ENABLE_SHARED)
# Maybe re-export symbols from libc++abi
# In particular, we don't re-export the symbols if libc++abi is merged statically
# into libc++ because in that case there's no dylib to re-export from.
if (APPLE AND LIBCXX_CXX_ABI STREQUAL "libcxxabi"
if (APPLE AND LIBCXX_CXX_ABI MATCHES "libcxxabi$"
AND NOT DEFINED LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS
AND NOT LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY)
set(LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS ON)