llvmPackages_7.libcxxabi: take libunwind as an optional dependency again
This reverts commit 76b54c75b3 and brings
llvmPackages_7.libcxxabi in line with what the other llvmPackages
sets are doing again (with llvmPackages_7 being the sole outlier).
This also fixes an evaluation error of llvmPackages_7.libcxxabi if
stdenv.hostPlatform.useLLVM is true as the nonexistant libunwind
argument would be overridden.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{ lib, stdenv, cmake, fetch, libcxx, llvm, version
|
{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version
|
||||||
, standalone ? false
|
, standalone ? stdenv.hostPlatform.useLLVM or false
|
||||||
# on musl the shared objects don't build
|
# on musl the shared objects don't build
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
@@ -11,6 +11,7 @@ stdenv.mkDerivation {
|
|||||||
src = fetch "libcxxabi" "1zcqxsdjhawgz1cvpk07y3jl6fg9p3ay4nl69zsirqb2ghgyhhb2";
|
src = fetch "libcxxabi" "1zcqxsdjhawgz1cvpk07y3jl6fg9p3ay4nl69zsirqb2ghgyhhb2";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
unpackFile ${libcxx.src}
|
unpackFile ${libcxx.src}
|
||||||
@@ -22,9 +23,10 @@ stdenv.mkDerivation {
|
|||||||
patch -p1 -d $(ls -d libcxx-*) -i ${../../libcxx-0001-musl-hacks.patch}
|
patch -p1 -d $(ls -d libcxx-*) -i ${../../libcxx-0001-musl-hacks.patch}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags =
|
cmakeFlags = lib.optionals standalone [
|
||||||
lib.optional standalone "-DLLVM_ENABLE_LIBCXX=ON" ++
|
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||||
lib.optional (!enableShared) "-DLIBCXXABI_ENABLE_SHARED=OFF";
|
"-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
|
||||||
|
] ++ lib.optional (!enableShared) "-DLIBCXXABI_ENABLE_SHARED=OFF";
|
||||||
|
|
||||||
installPhase = if stdenv.isDarwin
|
installPhase = if stdenv.isDarwin
|
||||||
then ''
|
then ''
|
||||||
|
|||||||
Reference in New Issue
Block a user