2021-04-01 09:27:57 +00:00
|
|
|
{ lib, stdenv
|
|
|
|
, fetch
|
2021-03-17 17:17:32 +00:00
|
|
|
, libunwind
|
2021-04-01 09:27:57 +00:00
|
|
|
, cmake
|
|
|
|
, libxml2
|
|
|
|
, llvm
|
|
|
|
, version
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lld";
|
|
|
|
inherit version;
|
|
|
|
|
2021-04-15 14:28:00 +00:00
|
|
|
src = fetch pname "1zakyxk5bwnh7jarckcd4rbmzi58jgn2dbah5j5cwcyfyfbx9drc";
|
2021-04-01 09:27:57 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ llvm libxml2 ];
|
|
|
|
|
2021-03-17 17:17:32 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace MachO/CMakeLists.txt --replace \
|
|
|
|
'(''${LLVM_MAIN_SRC_DIR}/' '('
|
|
|
|
mkdir -p libunwind/include
|
|
|
|
tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/"
|
|
|
|
'';
|
|
|
|
|
2021-04-01 09:27:57 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
moveToOutput include "$dev"
|
|
|
|
moveToOutput lib "$dev"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The LLVM Linker";
|
|
|
|
homepage = "https://lld.llvm.org/";
|
|
|
|
license = lib.licenses.ncsa;
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|