From 1be8e73fb3bc13892e94951099e7f62b9f3a3626 Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 19 Apr 2021 15:02:40 +0200 Subject: [PATCH] stdenv: libcxxabi dropped standalone in favor of useLLVM The libcxxabi expression had a `standalone` argument in LLVM 7 which triggered passing of the `-DLLVM_ENABLE_LIBCXX=ON` flag. In LLVM 11 this flag and others are toggled by the `useLLVM` attribute of `stdenv.hostPlatform` but this toggles a flag we don't need on Darwin. Similar to the refactoring of LLVM 7 libc++abi by Ericson2314 in 3af7e984705, I have reintroduced the standalone argument for use in bootstrapping the Darwin stdenv. --- pkgs/development/compilers/llvm/11/libcxxabi/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/11/libcxxabi/default.nix b/pkgs/development/compilers/llvm/11/libcxxabi/default.nix index 65e0139a5910..9f6e303d31f7 100644 --- a/pkgs/development/compilers/llvm/11/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/11/libcxxabi/default.nix @@ -1,4 +1,6 @@ { lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version +, standalone ? stdenv.hostPlatform.useLLVM or false +, withLibunwind ? !stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm , enableShared ? !stdenv.hostPlatform.isStatic }: @@ -29,7 +31,7 @@ stdenv.mkDerivation { ]; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; + buildInputs = lib.optional withLibunwind libunwind; cmakeFlags = lib.optionals (stdenv.hostPlatform.useLLVM or false) [ "-DLLVM_ENABLE_LIBCXX=ON"