clang-ocl: init at 5.3.1

This commit is contained in:
Madoura 2022-11-03 14:19:12 -05:00
parent d147c1d5dd
commit edbebe1dbb
No known key found for this signature in database
GPG key ID: 3201136B3DB072F9
2 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,44 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, rocm-cmake
, rocm-device-libs
, clang
}:
stdenv.mkDerivation rec {
pname = "clang-ocl";
rocmVersion = "5.3.1";
version = rocmVersion;
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "clang-ocl";
rev = "rocm-${rocmVersion}";
hash = "sha256-uMSvcVJj+me2E+7FsXZ4l4hTcK6uKEegXpkHGcuist0=";
};
nativeBuildInputs = [
cmake
rocm-cmake
clang
];
buildInputs = [
rocm-device-libs
];
cmakeFlags = [
"-DCMAKE_C_COMPILER=clang"
"-DCMAKE_CXX_COMPILER=clang++"
];
meta = with lib; {
description = "OpenCL compilation with clang compiler";
homepage = "https://github.com/RadeonOpenCompute/clang-ocl";
license = with licenses; [ mit ];
maintainers = with maintainers; [ Madouura ];
broken = rocmVersion != clang.version;
};
}

View file

@ -14845,6 +14845,10 @@ with pkgs;
inherit (llvmPackages) openmp;
};
clang-ocl = callPackage ../development/libraries/clang-ocl {
inherit (llvmPackages_rocm) clang;
};
rgxg = callPackage ../tools/text/rgxg { };
rocclr = callPackage ../development/libraries/rocclr { };