llvmPackages_11.libcxxabi: More precise libunwind inclusion

This commit is contained in:
toonn 2021-11-15 16:07:31 +01:00 committed by Jonathan Ringer
parent 24dd96ebd4
commit d964f211f6

View file

@ -1,7 +1,7 @@
{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
, enableShared ? !stdenv.hostPlatform.isStatic
, standalone ? stdenv.hostPlatform.useLLVM or false
, withLibunwind ? !stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
@ -35,6 +35,7 @@ stdenv.mkDerivation {
cmakeFlags = lib.optionals standalone [
"-DLLVM_ENABLE_LIBCXX=ON"
] ++ lib.optionals (standalone && withLibunwind) [
"-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
] ++ lib.optionals stdenv.hostPlatform.isWasm [
"-DLIBCXXABI_ENABLE_THREADS=OFF"