llvmPackages: Fix more inconsistencies

The main thing was using `llvm_meta` in all versions.

Secondarily:

 - libunwindx7: Forgot to split outputs

 - libcxx{,abi} 12: Forgot to apply output-splitting patches.

 - simplify `useLLVM` stdenv-switching logic.

 - openmp always gets its own directory
This commit is contained in:
John Ericson
2021-05-12 00:16:11 +00:00
parent 37194a325d
commit e830db4320
82 changed files with 1489 additions and 623 deletions
@@ -1,12 +1,12 @@
{ lib, stdenv, version, fetch, fetchpatch, cmake, llvm
{ lib, stdenv, llvm_meta, version, fetch, fetchpatch, cmake, llvm
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "libunwind";
inherit version;
src = fetch "libunwind" "035dsxs10nyiqd00q07yycvmkjl01yz4jdlrjvmch8klxg4pyjhp";
src = fetch pname "035dsxs10nyiqd00q07yycvmkjl01yz4jdlrjvmch8klxg4pyjhp";
postUnpack = ''
unpackFile ${llvm.src}
@@ -29,6 +29,8 @@ stdenv.mkDerivation {
})
];
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake ];
cmakeFlags = lib.optionals (!enableShared) [
@@ -36,4 +38,16 @@ stdenv.mkDerivation {
] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
"-DLLVM_ENABLE_LIBCXX=ON"
];
meta = llvm_meta // {
# Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
description = "LLVM's unwinder library";
longDescription = ''
The unwind library provides a family of _Unwind_* functions implementing
the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
I). It is a dependency of the C++ ABI library, and sometimes is a
dependency of other runtimes.
'';
};
}