38 lines
835 B
Nix
Raw Normal View History

{ lib, stdenv
, buildLlvmTools
, fetch
, cmake
, libxml2
, libllvm
, version
}:
stdenv.mkDerivation {
2019-08-13 21:52:01 +00:00
pname = "lld";
inherit version;
2019-04-23 00:30:45 -05:00
src = fetch "lld" "0rsqb7zcnij5r5ipfhr129j7skr5n9pyr388kjpqwh091952f3x1";
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 = {
description = "The LLVM Linker";
homepage = "https://lld.llvm.org/";
license = lib.licenses.ncsa;
platforms = lib.platforms.all;
};
}