mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-25 06:38:22 +03:00
rocm-comgr: init at 3.5.0
This commit is contained in:
parent
b5de63fb8c
commit
bf54eee427
46
pkgs/development/libraries/rocm-comgr/default.nix
Normal file
46
pkgs/development/libraries/rocm-comgr/default.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, clang, device-libs, lld, llvm }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rocm-comgr";
|
||||
version = "3.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RadeonOpenCompute";
|
||||
repo = "ROCm-CompilerSupport";
|
||||
rev = "rocm-${version}";
|
||||
sha256 = "0h9bxz98sskgzc3xpnp469iq1wi59nbijbqprlylha91y10hqb88";
|
||||
};
|
||||
|
||||
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 stdenv.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; [ danieldk ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -9235,6 +9235,11 @@ in
|
||||
|
||||
rgbds = callPackage ../development/compilers/rgbds { };
|
||||
|
||||
rocm-comgr = callPackage ../development/libraries/rocm-comgr {
|
||||
inherit (llvmPackages_rocm) clang lld llvm;
|
||||
device-libs = rocm-device-libs;
|
||||
};
|
||||
|
||||
rocm-device-libs = callPackage ../development/libraries/rocm-device-libs {
|
||||
inherit (llvmPackages_rocm) clang clang-unwrapped lld llvm;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user