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

41 lines
809 B
Nix
Raw Normal View History

2021-09-02 20:20:50 +01:00
{ stdenv
, lib
2020-07-10 18:28:08 +01:00
, cmake
, libxml2
, llvm
, version
, src
}:
stdenv.mkDerivation rec {
inherit version src;
pname = "lld";
nativeBuildInputs = [ cmake ];
2021-09-02 20:20:50 +01:00
buildInputs = [ libxml2 llvm ];
outputs = [ "out" "dev" ];
2021-03-24 07:43:58 +00:00
2021-09-02 20:20:50 +01:00
cmakeFlags = [ "-DLLVM_MAIN_SRC_DIR=${llvm.src}" ];
2020-07-10 18:28:08 +01:00
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"
2020-07-10 18:28:08 +01: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; [ acowley lovesegfault ];
2020-07-10 18:28:08 +01:00
platforms = platforms.linux;
};
}