libc++-4.0rc2: Use substituteInPlace instead of the Darwin patch.
On 3.9 the substituteInPlace is equivalent to the patch, hopefully this is a slightly more robust way to make the same substitution for the 4.0 version. Apply this change unconditionally for consistency across versions, even if the changed strings are unused on other platforms. Discussion: https://github.com/NixOS/nixpkgs/pull/22970#discussion_r101926144
This commit is contained in:
parent
2ebb086df1
commit
753058baef
@ -1,39 +0,0 @@
|
||||
--- libcxx-3.8.0.src.org/lib/CMakeLists.txt 2015-12-16 15:41:05.000000000 -0800
|
||||
+++ libcxx-3.8.0.src/lib/CMakeLists.txt 2016-06-17 19:40:00.293394500 -0700
|
||||
@@ -94,30 +94,30 @@
|
||||
add_definitions(-D__STRICT_ANSI__)
|
||||
add_link_flags(
|
||||
"-compatibility_version 1"
|
||||
"-current_version 1"
|
||||
- "-install_name /usr/lib/libc++.1.dylib"
|
||||
- "-Wl,-reexport_library,/usr/lib/libc++abi.dylib"
|
||||
+ "-install_name ${LIBCXX_LIBCXXABI_LIB_PATH}/libc++.1.dylib"
|
||||
+ "-Wl,-reexport_library,${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib"
|
||||
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
|
||||
"/usr/lib/libSystem.B.dylib")
|
||||
else()
|
||||
if ( ${CMAKE_OSX_SYSROOT} )
|
||||
list(FIND ${CMAKE_OSX_ARCHITECTURES} "armv7" OSX_HAS_ARMV7)
|
||||
if (OSX_HAS_ARMV7)
|
||||
set(OSX_RE_EXPORT_LINE
|
||||
- "${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib"
|
||||
+ "${CMAKE_OSX_SYSROOT}${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib"
|
||||
"-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++sjlj-abi.exp")
|
||||
else()
|
||||
set(OSX_RE_EXPORT_LINE
|
||||
- "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib")
|
||||
+ "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib")
|
||||
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")
|
||||
+ set(OSX_RE_EXPORT_LINE "${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp")
|
||||
endif()
|
||||
|
||||
add_link_flags(
|
||||
"-compatibility_version 1"
|
||||
- "-install_name /usr/lib/libc++.1.dylib"
|
||||
+ "-install_name ${LIBCXX_LIBCXXABI_LIB_PATH}/libc++.1.dylib"
|
||||
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
|
||||
"${OSX_RE_EXPORT_LINE}"
|
||||
"-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/notweak.exp"
|
||||
"-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/weak.exp")
|
@ -15,7 +15,9 @@ stdenv.mkDerivation rec {
|
||||
cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR")
|
||||
'';
|
||||
|
||||
patches = lib.optional stdenv.isDarwin ./darwin.patch;
|
||||
patchPhase = ''
|
||||
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
|
||||
'';
|
||||
|
||||
buildInputs = [ cmake llvm libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user