2021-01-22 11:25:31 +00:00
|
|
|
{ lib, stdenv
|
2020-07-10 18:28:08 +01:00
|
|
|
, cmake
|
|
|
|
, libxml2
|
|
|
|
, llvm
|
|
|
|
|
|
|
|
, version
|
|
|
|
, src
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit version src;
|
|
|
|
|
|
|
|
pname = "lld";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [ libxml2 llvm ];
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-03-24 07:43:58 +00:00
|
|
|
cmakeFlags = [ "-DLLVM_MAIN_SRC_DIR=${llvm.src}" ];
|
|
|
|
|
2020-07-10 18:28:08 +01:00
|
|
|
postInstall = ''
|
|
|
|
moveToOutput include "$dev"
|
|
|
|
moveToOutput lib "$dev"
|
2020-11-03 06:29:45 +00:00
|
|
|
|
|
|
|
# Fix lld binary path for CMake.
|
|
|
|
substituteInPlace "$dev/lib/cmake/lld/LLDTargets-release.cmake" \
|
|
|
|
--replace "\''${_IMPORT_PREFIX}/bin/lld" "$out/bin/lld"
|
2020-07-10 18:28:08 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
meta = with lib; {
|
2020-07-10 18:28:08 +01:00
|
|
|
description = "ROCm fork of the LLVM Linker";
|
|
|
|
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
|
|
|
|
license = licenses.ncsa;
|
|
|
|
maintainers = with maintainers; [ danieldk ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|