Skip to content

Commit c7d4aa7

Browse files
committed
[libc++] Move the weak symbols list to libc++abi
Those symbols are exported from libc++abi in the first place, so it makes more sense to have them there.
1 parent 4edd74a commit c7d4aa7

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

libcxx/lib/weak.exp

Lines changed: 0 additions & 16 deletions
This file was deleted.

libcxx/src/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ if (LIBCXX_ENABLE_SHARED)
210210
target_link_libraries(cxx_shared PRIVATE
211211
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++unexp.exp"
212212
"-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++abi.v${LIBCXX_LIBCPPABI_VERSION}.exp"
213-
"-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/notweak.exp"
214-
"-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/weak.exp")
213+
"-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/notweak.exp")
215214

216215
if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
217216
target_link_libraries(cxx_shared PRIVATE

libcxxabi/lib/weak.exp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
__ZTISt11range_error
2+
__ZTISt12domain_error
3+
__ZTISt12length_error
4+
__ZTISt12out_of_range
5+
__ZTISt14overflow_error
6+
__ZTISt15underflow_error
7+
__ZTISt16invalid_argument

libcxxabi/src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ if (LIBCXXABI_ENABLE_SHARED)
214214

215215
export_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/itanium-base.exp")
216216

217+
target_link_libraries(cxxabi_shared PRIVATE "-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/weak.exp")
218+
217219
if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
218220
export_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/new-delete.exp")
219221
endif()

0 commit comments

Comments
 (0)