e830db4320
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
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{ lib, stdenv, llvm_meta
|
|
, buildLlvmTools
|
|
, fetch
|
|
, cmake
|
|
, libxml2
|
|
, libllvm
|
|
, version
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "lld";
|
|
inherit version;
|
|
|
|
src = fetch pname "04afcfq2h7ysyqxxhyhb7ig4p0vdw7mi63kh8mffl74j0rc781p7";
|
|
|
|
patches = [
|
|
./gnu-install-dirs.patch
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ libllvm libxml2 ];
|
|
|
|
cmakeFlags = [
|
|
"-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
|
|
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
|
];
|
|
|
|
outputs = [ "out" "lib" "dev" ];
|
|
|
|
meta = llvm_meta // {
|
|
homepage = "https://lld.llvm.org/";
|
|
description = "The LLVM linker";
|
|
longDescription = ''
|
|
LLD is a linker from the LLVM project that is a drop-in replacement for
|
|
system linkers and runs much faster than them. It also provides features
|
|
that are useful for toolchain developers.
|
|
The linker supports ELF (Unix), PE/COFF (Windows), and Mach-O (macOS)
|
|
in descending order of completeness. Internally, LLD consists
|
|
of several different linkers.
|
|
'';
|
|
};
|
|
}
|