38 lines
857 B
Nix
Raw Normal View History

{ lib, stdenv
, buildLlvmTools
2017-09-15 19:38:38 -05:00
, fetch
, cmake
, libllvm
2017-09-15 19:38:38 -05:00
, version
}:
stdenv.mkDerivation {
2019-08-13 21:52:01 +00:00
pname = "lld";
inherit version;
2017-09-15 19:38:38 -05:00
2018-05-04 10:54:06 -05:00
src = fetch "lld" "1ah75rjly6747jk1zbwca3z0svr9b09ylgxd4x9ns721xir6sia6";
2017-09-15 19:38:38 -05:00
patches = [
./gnu-install-dirs.patch
];
2017-09-15 19:38:38 -05:00
nativeBuildInputs = [ cmake ];
buildInputs = [ libllvm ];
2017-09-15 19:38:38 -05: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"
];
2017-09-15 19:38:38 -05:00
outputs = [ "out" "lib" "dev" ];
2017-09-15 19:38:38 -05:00
meta = {
description = "The LLVM Linker";
homepage = "https://lld.llvm.org/";
license = lib.licenses.ncsa;
platforms = lib.platforms.all;
badPlatforms = [ "x86_64-darwin" ];
2017-09-15 19:38:38 -05:00
};
}