48af15f7a5
GitOrigin-RevId: 04a2b269d8921505a2969fc9ec25c1f517f2b307
39 lines
796 B
Nix
39 lines
796 B
Nix
{ lib, stdenv
|
|
, cmake
|
|
, libxml2
|
|
, llvm
|
|
|
|
, version
|
|
, src
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
inherit version src;
|
|
|
|
pname = "lld";
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ libxml2 llvm ];
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
cmakeFlags = [ "-DLLVM_MAIN_SRC_DIR=${llvm.src}" ];
|
|
|
|
postInstall = ''
|
|
moveToOutput include "$dev"
|
|
moveToOutput lib "$dev"
|
|
|
|
# Fix lld binary path for CMake.
|
|
substituteInPlace "$dev/lib/cmake/lld/LLDTargets-release.cmake" \
|
|
--replace "\''${_IMPORT_PREFIX}/bin/lld" "$out/bin/lld"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "ROCm fork of the LLVM Linker";
|
|
homepage = "https://github.com/RadeonOpenCompute/llvm-project";
|
|
license = licenses.ncsa;
|
|
maintainers = with maintainers; [ danieldk ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|