[libcxx-commits] [libcxx] d5a6da8 - [libc++/abi] Revert "[libc++] Move the weak symbols list to libc++abi"

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 5 08:44:17 PDT 2020


Author: Louis Dionne
Date: 2020-10-05T11:42:13-04:00
New Revision: d5a6da84a3462d41be003f4e5d4d1d2e0364ce9d

URL: https://github.com/llvm/llvm-project/commit/d5a6da84a3462d41be003f4e5d4d1d2e0364ce9d
DIFF: https://github.com/llvm/llvm-project/commit/d5a6da84a3462d41be003f4e5d4d1d2e0364ce9d.diff

LOG: [libc++/abi] Revert "[libc++] Move the weak symbols list to libc++abi"

This reverts commit c7d4aa711a. I am still investigating the issue,
but it looks like that commit has an interaction with ld64 that causes
new/delete weak re-exports not to work properly anymore. This is weird
because this commit did not touch the exports of new/delete -- I am
still investigating.

Added: 
    libcxx/lib/weak.exp

Modified: 
    libcxx/src/CMakeLists.txt
    libcxxabi/src/CMakeLists.txt

Removed: 
    libcxxabi/lib/weak.exp


################################################################################
diff  --git a/libcxx/lib/weak.exp b/libcxx/lib/weak.exp
new file mode 100644
index 000000000000..6bdcc0578460
--- /dev/null
+++ b/libcxx/lib/weak.exp
@@ -0,0 +1,16 @@
+__ZTISt10bad_typeid
+__ZTISt11logic_error
+__ZTISt11range_error
+__ZTISt12domain_error
+__ZTISt12length_error
+__ZTISt12out_of_range
+__ZTISt13bad_exception
+__ZTISt13runtime_error
+__ZTISt14overflow_error
+__ZTISt15underflow_error
+__ZTISt16invalid_argument
+__ZTISt16nested_exception
+__ZTISt20bad_array_new_length
+__ZTISt8bad_cast
+__ZTISt9bad_alloc
+__ZTISt9exception

diff  --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 98a374c2bf9f..0e6819369ffa 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -210,7 +210,8 @@ if (LIBCXX_ENABLE_SHARED)
     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.v${LIBCXX_LIBCPPABI_VERSION}.exp"
-      "-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/notweak.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")
 
     if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
       target_link_libraries(cxx_shared PRIVATE

diff  --git a/libcxxabi/lib/weak.exp b/libcxxabi/lib/weak.exp
deleted file mode 100644
index 784ca45decc1..000000000000
--- a/libcxxabi/lib/weak.exp
+++ /dev/null
@@ -1,7 +0,0 @@
-__ZTISt11range_error
-__ZTISt12domain_error
-__ZTISt12length_error
-__ZTISt12out_of_range
-__ZTISt14overflow_error
-__ZTISt15underflow_error
-__ZTISt16invalid_argument

diff  --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt
index 58d04e6578e3..c57d6fa83aa0 100644
--- a/libcxxabi/src/CMakeLists.txt
+++ b/libcxxabi/src/CMakeLists.txt
@@ -214,8 +214,6 @@ if (LIBCXXABI_ENABLE_SHARED)
 
     export_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/itanium-base.exp")
 
-    target_link_libraries(cxxabi_shared PRIVATE "-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/weak.exp")
-
     if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
       export_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/new-delete.exp")
     endif()


        


More information about the libcxx-commits mailing list