Skip to content

[libc++] Always keep libc++abi re-exports up-to-date #79012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions libcxx/lib/abi/CHANGELOG.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,71 @@ To generate a summary, re-generate the new ABI list using the

New entries should be added directly below the "Version" header.

------------
Version 19.0
------------

* [libc++] Always keep libc++abi re-exports up-to-date

This patch makes sure that the set of libc++abi symbols re-exported from libc++
is up-to-date with the symbols that libc++abi re-exports. As such, it adds several
symbols that were left out of the libc++ re-exports list. Exporting new symbols
is not an ABI break.

<arch>-apple-darwin
-------------------
Symbol reexported: ___cxa_current_primary_exception
Symbol reexported: ___cxa_decrement_exception_refcount
Symbol reexported: ___cxa_increment_exception_refcount
Symbol reexported: ___cxa_new_handler
Symbol reexported: ___cxa_rethrow_primary_exception
Symbol reexported: ___cxa_terminate_handler
Symbol reexported: ___cxa_uncaught_exception
Symbol reexported: ___cxa_unexpected_handler
Symbol reexported: __ZTIDh
Symbol reexported: __ZTIDu
Symbol reexported: __ZTIg
Symbol reexported: __ZTIn
Symbol reexported: __ZTIN10__cxxabiv116__enum_type_infoE
Symbol reexported: __ZTIN10__cxxabiv116__shim_type_infoE
Symbol reexported: __ZTIN10__cxxabiv117__array_type_infoE
Symbol reexported: __ZTIN10__cxxabiv117__class_type_infoE
Symbol reexported: __ZTIN10__cxxabiv117__pbase_type_infoE
Symbol reexported: __ZTIN10__cxxabiv119__pointer_type_infoE
Symbol reexported: __ZTIN10__cxxabiv120__function_type_infoE
Symbol reexported: __ZTIN10__cxxabiv120__si_class_type_infoE
Symbol reexported: __ZTIN10__cxxabiv121__vmi_class_type_infoE
Symbol reexported: __ZTIN10__cxxabiv123__fundamental_type_infoE
Symbol reexported: __ZTIN10__cxxabiv129__pointer_to_member_type_infoE
Symbol reexported: __ZTIo
Symbol reexported: __ZTIPDh
Symbol reexported: __ZTIPDu
Symbol reexported: __ZTIPg
Symbol reexported: __ZTIPKDh
Symbol reexported: __ZTIPKDu
Symbol reexported: __ZTIPKg
Symbol reexported: __ZTIPKn
Symbol reexported: __ZTIPKo
Symbol reexported: __ZTIPn
Symbol reexported: __ZTIPo
Symbol reexported: __ZTSDh
Symbol reexported: __ZTSDu
Symbol reexported: __ZTSg
Symbol reexported: __ZTSn
Symbol reexported: __ZTSN10__cxxabiv116__shim_type_infoE
Symbol reexported: __ZTSo
Symbol reexported: __ZTSPDh
Symbol reexported: __ZTSPDu
Symbol reexported: __ZTSPg
Symbol reexported: __ZTSPKDh
Symbol reexported: __ZTSPKDu
Symbol reexported: __ZTSPKg
Symbol reexported: __ZTSPKn
Symbol reexported: __ZTSPKo
Symbol reexported: __ZTSPn
Symbol reexported: __ZTSPo
Symbol reexported: __ZTVN10__cxxabiv116__shim_type_infoE

------------
Version 18.0
------------
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions libcxx/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
38 changes: 38 additions & 0 deletions libcxxabi/lib/cxxabiv1.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Typeinfos for types from libc++abi
__ZTIN10__cxxabiv116__enum_type_infoE
__ZTIN10__cxxabiv116__shim_type_infoE
__ZTIN10__cxxabiv117__array_type_infoE
__ZTIN10__cxxabiv117__class_type_infoE
__ZTIN10__cxxabiv117__pbase_type_infoE
__ZTIN10__cxxabiv119__pointer_type_infoE
__ZTIN10__cxxabiv120__function_type_infoE
__ZTIN10__cxxabiv120__si_class_type_infoE
__ZTIN10__cxxabiv121__vmi_class_type_infoE
__ZTIN10__cxxabiv123__fundamental_type_infoE
__ZTIN10__cxxabiv129__pointer_to_member_type_infoE

# Typeinfo names for types from libc++abi
__ZTSN10__cxxabiv116__enum_type_infoE
__ZTSN10__cxxabiv116__shim_type_infoE
__ZTSN10__cxxabiv117__array_type_infoE
__ZTSN10__cxxabiv117__class_type_infoE
__ZTSN10__cxxabiv117__pbase_type_infoE
__ZTSN10__cxxabiv119__pointer_type_infoE
__ZTSN10__cxxabiv120__function_type_infoE
__ZTSN10__cxxabiv120__si_class_type_infoE
__ZTSN10__cxxabiv121__vmi_class_type_infoE
__ZTSN10__cxxabiv123__fundamental_type_infoE
__ZTSN10__cxxabiv129__pointer_to_member_type_infoE

# Vtables for libc++abi types
__ZTVN10__cxxabiv116__enum_type_infoE
__ZTVN10__cxxabiv116__shim_type_infoE
__ZTVN10__cxxabiv117__array_type_infoE
__ZTVN10__cxxabiv117__class_type_infoE
__ZTVN10__cxxabiv117__pbase_type_infoE
__ZTVN10__cxxabiv119__pointer_type_infoE
__ZTVN10__cxxabiv120__function_type_infoE
__ZTVN10__cxxabiv120__si_class_type_infoE
__ZTVN10__cxxabiv121__vmi_class_type_infoE
__ZTVN10__cxxabiv123__fundamental_type_infoE
__ZTVN10__cxxabiv129__pointer_to_member_type_infoE
153 changes: 153 additions & 0 deletions libcxxabi/lib/fundamental-types.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Typeinfos for fundamental types
__ZTIa
__ZTIb
__ZTIc
__ZTId
__ZTIDh
__ZTIDi
__ZTIDn
__ZTIDs
__ZTIDu
__ZTIe
__ZTIf
__ZTIg
__ZTIh
__ZTIi
__ZTIj
__ZTIl
__ZTIm
__ZTIn
__ZTIo
__ZTIPa
__ZTIPb
__ZTIPc
__ZTIPd
__ZTIPDh
__ZTIPDi
__ZTIPDn
__ZTIPDs
__ZTIPDu
__ZTIPe
__ZTIPf
__ZTIPg
__ZTIPh
__ZTIPi
__ZTIPj
__ZTIPKa
__ZTIPKb
__ZTIPKc
__ZTIPKd
__ZTIPKDh
__ZTIPKDi
__ZTIPKDn
__ZTIPKDs
__ZTIPKDu
__ZTIPKe
__ZTIPKf
__ZTIPKg
__ZTIPKh
__ZTIPKi
__ZTIPKj
__ZTIPKl
__ZTIPKm
__ZTIPKn
__ZTIPKo
__ZTIPKs
__ZTIPKt
__ZTIPKv
__ZTIPKw
__ZTIPKx
__ZTIPKy
__ZTIPl
__ZTIPm
__ZTIPn
__ZTIPo
__ZTIPs
__ZTIPt
__ZTIPv
__ZTIPw
__ZTIPx
__ZTIPy
__ZTIs
__ZTIt
__ZTIv
__ZTIw
__ZTIx
__ZTIy

# Typeinfo names for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