mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
llvmPackages_7.libunwind: simplify expressions
* Use LLVM_PATH instead of llvm-config * Pass less unnecessary options to cmake
This commit is contained in:
parent
1f520667be
commit
53adcfb798
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, version, fetch, fetchpatch, cmake, llvm, libcxx
|
||||
{ lib, stdenv, version, fetch, fetchpatch, cmake, llvm
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -8,6 +8,11 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetch "libunwind" "035dsxs10nyiqd00q07yycvmkjl01yz4jdlrjvmch8klxg4pyjhp";
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${llvm.src}
|
||||
cmakeFlagsArray=($cmakeFlagsArray -DLLVM_PATH=$PWD/$(ls -d llvm-*))
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||
@ -24,12 +29,11 @@ stdenv.mkDerivation {
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake llvm.dev ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = lib.optionals (!enableShared) [
|
||||
"-DLIBUNWIND_ENABLE_SHARED=OFF"
|
||||
] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||
"-DLIBUNWIND_HAS_NOSTDINCXX_FLAG=ON"
|
||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user