3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/llvm/11/lld/default.nix

38 lines
839 B
Nix
Raw Normal View History

{ lib, stdenv
, buildLlvmTools
, fetch
, cmake
, libxml2
, libllvm
, version
}:
stdenv.mkDerivation rec {
pname = "lld";
inherit version;
2021-02-17 20:39:09 +00:00
src = fetch pname "1kk61i7z5bi9i11rzsd2b388d42if1c7a45zkaa4mk0yps67hyh1";
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;
};
}