[libcxx] r299052 - Do not pass an explicit reexported symbol list when building libc++ dylib if also defining new/delete
Mehdi Amini via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 29 21:40:56 PDT 2017
Author: mehdi_amini
Date: Wed Mar 29 23:40:56 2017
New Revision: 299052
URL: http://llvm.org/viewvc/llvm-project?rev=299052&view=rev
Log:
Do not pass an explicit reexported symbol list when building libc++ dylib if also defining new/delete
Modified:
libcxx/trunk/lib/CMakeLists.txt
Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=299052&r1=299051&r2=299052&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Wed Mar 29 23:40:56 2017
@@ -150,7 +150,11 @@ if (LIBCXX_OSX_REEXPORT_SYSTEM_ABI_LIBRA
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
"/usr/lib/libSystem.B.dylib")
else()
- if (DEFINED CMAKE_OSX_SYSROOT AND NOT CMAKE_OSX_SYSROOT STREQUAL "")
+ 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 "")
list(FIND CMAKE_OSX_ARCHITECTURES "armv7" OSX_HAS_ARMV7)
if (NOT OSX_HAS_ARMV7 EQUAL -1)
set(OSX_RE_EXPORT_LINE
More information about the cfe-commits
mailing list