My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/compilers/llvm/rocm/lld.nix

43 lines
858 B

{ stdenv
, lib
, cmake
, libxml2
, llvm
, ninja
, version
, src
}:
stdenv.mkDerivation rec {
inherit version src;
sourceRoot = "${src.name}/lld";
pname = "lld";
nativeBuildInputs = [ cmake ninja ];
buildInputs = [ libxml2 llvm ];
outputs = [ "out" "dev" ];
cmakeFlags = [ "-DLLVM_MAIN_SRC_DIR=${src}/llvm" ];
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; [ acowley lovesegfault ];
platforms = platforms.linux;
};
}