khronos-ocl-icd-loader: refactor

This commit is contained in:
Weijia Wang 2024-01-20 08:29:05 +01:00
parent b2f5fd5266
commit 0d2443f291
2 changed files with 7 additions and 18 deletions

View File

@ -1,26 +1,28 @@
{ lib, stdenv, fetchFromGitHub, opencl-headers, cmake, withTracing ? false }:
stdenv.mkDerivation rec {
pname = "khronos-ocl-icd-loader";
pname = "opencl-icd-loader";
version = "2023.12.14";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "OpenCL-ICD-Loader";
rev = "v${version}";
sha256 = "sha256-/4ixQAwJpygdg+qtR1ccBlz8hmtYYxRgUV5dlJabsg8=";
hash = "sha256-/4ixQAwJpygdg+qtR1ccBlz8hmtYYxRgUV5dlJabsg8=";
};
patches = lib.optional withTracing ./tracing.patch;
nativeBuildInputs = [ cmake ];
buildInputs = [ opencl-headers ];
cmakeFlags = [
(lib.cmakeBool "OCL_ICD_ENABLE_TRACE" withTracing)
];
meta = with lib; {
description = "Official Khronos OpenCL ICD Loader";
homepage = "https://github.com/KhronosGroup/OpenCL-ICD-Loader";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ davidtwco ];
platforms = platforms.unix;
};
}

View File

@ -1,13 +0,0 @@
diff --git a/loader/icd.h b/loader/icd.h
index 34751e9..01a33fd 100644
--- a/loader/icd.h
+++ b/loader/icd.h
@@ -123,7 +123,7 @@ void khrIcdContextPropertiesGetPlatform(
cl_platform_id *outPlatform);
// internal tracing macros
-#if 0
+#if 1
#include <stdio.h>
#define KHR_ICD_TRACE(...) \
do \