forked from mirrors/nixpkgs
017aa88470
- AMD GPU packages: AMD removed support for the RX5x0 GPUs from ROCm, so I cannot test these packages anymore. - A small number of GUI packages: I switched back to macOS on the desktop for work reasons, so I cannot easily test these. - broot: I took over maintainership from someone else, but do not really use broot.
47 lines
1.4 KiB
Nix
47 lines
1.4 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, clang, device-libs, lld, llvm }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rocm-comgr";
|
|
version = "4.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "RadeonOpenCompute";
|
|
repo = "ROCm-CompilerSupport";
|
|
rev = "rocm-${version}";
|
|
hash = "sha256-LbQqyJxRqb6vpXiYSkRlF1FeqXJJXktPafGmYDDK02U=";
|
|
};
|
|
|
|
sourceRoot = "source/lib/comgr";
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ clang device-libs lld llvm ];
|
|
|
|
cmakeFlags = [
|
|
"-DCLANG=${clang}/bin/clang"
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
"-DCMAKE_C_COMPILER=${clang}/bin/clang"
|
|
"-DCMAKE_CXX_COMPILER=${clang}/bin/clang++"
|
|
"-DCMAKE_PREFIX_PATH=${llvm}/lib/cmake/llvm"
|
|
"-DLLD_INCLUDE_DIRS=${lld.src}/include"
|
|
"-DLLVM_TARGETS_TO_BUILD=\"AMDGPU;X86\""
|
|
];
|
|
|
|
# The comgr build tends to link against the static LLVM libraries
|
|
# *and* the dynamic library. Linking against both causes errors
|
|
# about command line options being registered twice. This patch
|
|
# removes the static library linking.
|
|
patchPhase = ''
|
|
sed -e '/^llvm_map_components_to_libnames/,/[[:space:]]*Symbolize)/d' \
|
|
-i CMakeLists.txt
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "APIs for compiling and inspecting AMDGPU code objects";
|
|
homepage = "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/tree/amd-stg-open/lib/comgr";
|
|
license = licenses.ncsa;
|
|
maintainers = with maintainers; [ ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|