[PATCH] D31644: [libcxx] Fix check-cxx-abilist on OS X

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 3 21:57:52 PDT 2017


EricWF updated this revision to Diff 94000.
EricWF added a comment.

- Remove silly changes to `libc++abi2.exp`


https://reviews.llvm.org/D31644

Files:
  lib/CMakeLists.txt
  lib/libc++abi-new-delete.exp
  lib/libc++abi2.exp


Index: lib/libc++abi2.exp
===================================================================
--- lib/libc++abi2.exp
+++ lib/libc++abi2.exp
@@ -209,14 +209,6 @@
 __ZNSt20bad_array_new_lengthD0Ev
 __ZNSt20bad_array_new_lengthD2Ev
 __ZSt10unexpectedv
-__ZdaPv
-__ZdlPv
-__ZdlPvRKSt9nothrow_t
-__Znam
-__ZdaPvRKSt9nothrow_t
-__Znwm
-__ZnwmRKSt9nothrow_t
-__ZnamRKSt9nothrow_t
 __ZTISt10bad_typeid
 __ZTISt8bad_cast
 ___cxa_bad_typeid
Index: lib/libc++abi-new-delete.exp
===================================================================
--- /dev/null
+++ lib/libc++abi-new-delete.exp
@@ -0,0 +1,8 @@
+__ZdaPv
+__ZdlPv
+__ZdlPvRKSt9nothrow_t
+__Znam
+__ZdaPvRKSt9nothrow_t
+__Znwm
+__ZnwmRKSt9nothrow_t
+__ZnamRKSt9nothrow_t
Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -150,11 +150,7 @@
       "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
       "/usr/lib/libSystem.B.dylib")
   else()
-    if (LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
-        # We can't use the "-reexported_symbols_list" when we build the
-        # new/delete operators as part of the dylib: the linker would fail.
-        set(OSX_RE_EXPORT_LINE "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib")
-	elseif (DEFINED CMAKE_OSX_SYSROOT AND NOT CMAKE_OSX_SYSROOT STREQUAL "")
+	  if (DEFINED CMAKE_OSX_SYSROOT AND NOT CMAKE_OSX_SYSROOT STREQUAL "")
       list(FIND CMAKE_OSX_ARCHITECTURES "armv7" OSX_HAS_ARMV7)
       if (NOT OSX_HAS_ARMV7 EQUAL -1)
         set(OSX_RE_EXPORT_LINE
@@ -166,8 +162,10 @@
       endif()
     else()
       set(OSX_RE_EXPORT_LINE "/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp")
+      if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
+        add_link_flags("/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi-new-delete.exp")
+      endif()
     endif()
-
     add_link_flags(
       "-compatibility_version 1"
       "-install_name /usr/lib/libc++.1.dylib"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31644.94000.patch
Type: text/x-patch
Size: 2117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170404/fb19680a/attachment.bin>


More information about the cfe-commits mailing list