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

40 lines
796 B
Nix
Raw Normal View History

{ 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"
# 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; [ danieldk ];
platforms = platforms.linux;
};
}