aboutsummaryrefslogtreecommitdiff
path: root/libcxx/src
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2024-02-26 14:55:10 -0500
committerGitHub <noreply@github.com>2024-02-26 14:55:10 -0500
commit6a884a9aef397f76178b141d789efadf280f2c3f (patch)
tree672e8cf2b2e5784a2175459bc41db0add838fb14 /libcxx/src
parent7b66b5d6c2fadb1e9f8cfc8d1864d4109105001f (diff)
downloadllvm-6a884a9aef397f76178b141d789efadf280f2c3f.zip
llvm-6a884a9aef397f76178b141d789efadf280f2c3f.tar.gz
llvm-6a884a9aef397f76178b141d789efadf280f2c3f.tar.bz2
[libc++] Always keep libc++abi re-exports up-to-date (#79012)
Previously, the list of libc++abi symbols that we re-export from libc++ would be partly encoded in libc++abi (and re-exported automatically via the cxxabi-reexports target), and partly hard-coded in libcxx/lib/libc++abi.exp. The duplication of information led to symbols not being exported from libc++ after being added to libc++abi when they should have been. This patch removes the duplication of information. After this patch, the full list of symbols to re-export from libc++abi is handled by the cxxabi-reexports target and is stored in libcxxabi. The symbols newly re-exported from libc++ are mainly new fundamental typeinfos and a bunch of functions and classes that are part of libc++abi but are most likely implementation details. In the future, it would be possible to try to trim down the set of what we export from libc++abi (and hence what we re-export from libc++) to remove some implementation detail symbols. Fixes #79008
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/CMakeLists.txt9
1 files changed, 2 insertions, 7 deletions
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index cc6954a..07ffc8b 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -231,19 +231,14 @@ if (LIBCXX_ENABLE_SHARED)
# 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 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)
- endif()
+ target_link_libraries(cxx_shared PRIVATE cxxabi-reexports)
- if (LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS)
+ # TODO: These exports controls should not be tied to whether we re-export libc++abi symbols
target_link_libraries(cxx_shared PRIVATE
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++unexp.exp"
- "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++abi.exp"
"-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/notweak.exp"
"-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/weak.exp")
-
- target_link_libraries(cxx_shared PRIVATE $<TARGET_NAME_IF_EXISTS:cxxabi-reexports>)
endif()
# Generate a linker script in place of a libc++.so symlink.