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
3af7e98470, I have reintroduced the standalone argument for use in
bootstrapping the Darwin stdenv.
This commit is contained in:
toonn
2021-11-24 15:17:13 -08:00
committed by Jonathan Ringer
parent 9687654011
commit 1be8e73fb3
@@ -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"