38 lines
835 B
Nix
Raw Normal View History

{ lib, stdenv
, buildLlvmTools
2018-01-31 08:09:24 -06:00
, fetch
, cmake
2018-01-31 08:50:18 -06:00
, libxml2
, libllvm
2018-01-31 08:09:24 -06:00
, version
}:
stdenv.mkDerivation {
2019-08-13 21:52:01 +00:00
pname = "lld";
inherit version;
2018-01-31 08:09:24 -06:00
2018-06-28 15:58:05 -05:00
src = fetch "lld" "04afcfq2h7ysyqxxhyhb7ig4p0vdw7mi63kh8mffl74j0rc781p7";
2018-01-31 08:09:24 -06:00
patches = [
./gnu-install-dirs.patch
];
2018-01-31 08:09:24 -06:00
nativeBuildInputs = [ cmake ];
buildInputs = [ libllvm libxml2 ];
2018-01-31 08:09:24 -06:00
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"
];
2018-01-31 08:09:24 -06:00
outputs = [ "out" "lib" "dev" ];
2018-01-31 08:09:24 -06:00
meta = {
description = "The LLVM Linker";
homepage = "https://lld.llvm.org/";
license = lib.licenses.ncsa;
platforms = lib.platforms.all;
2018-01-31 08:09:24 -06:00
};
}