mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
intel-graphics-compiler: 1.0.12812.26 -> 1.0.14828.8
This commit is contained in:
parent
e5e0daa2ff
commit
eeb9587c6c
@ -5,7 +5,7 @@
|
||||
, runCommandLocal
|
||||
, bison
|
||||
, flex
|
||||
, llvmPackages_11
|
||||
, llvmPackages_14
|
||||
, opencl-clang
|
||||
, python3
|
||||
, spirv-tools
|
||||
@ -19,32 +19,29 @@ let
|
||||
vc_intrinsics_src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "vc-intrinsics";
|
||||
rev = "v0.11.0";
|
||||
sha256 = "sha256-74JBW7qU8huSqwqgxNbvbGj1DlJJThgGhb3owBYmhvI=";
|
||||
rev = "v0.13.0";
|
||||
hash = "sha256-A9G1PH0WGdxU2u/ODrou53qF9kvrmE0tJSl9cFIOus0=";
|
||||
};
|
||||
|
||||
llvmPkgs = llvmPackages_11 // {
|
||||
spirv-llvm-translator = spirv-llvm-translator.override { llvm = llvm; };
|
||||
} // lib.optionalAttrs buildWithPatches opencl-clang;
|
||||
|
||||
inherit (llvmPackages_11) lld llvm;
|
||||
inherit (llvmPkgs) clang libclang spirv-llvm-translator;
|
||||
inherit (llvmPackages_14) lld llvm;
|
||||
inherit (if buildWithPatches then opencl-clang else llvmPackages_14) clang libclang;
|
||||
spirv-llvm-translator' = spirv-llvm-translator.override { inherit llvm; };
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "intel-graphics-compiler";
|
||||
version = "1.0.12812.26";
|
||||
version = "1.0.14828.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "intel-graphics-compiler";
|
||||
rev = "igc-${version}";
|
||||
sha256 = "sha256-KpaDaDYVp40H7OscDGUpzEMgIOIk397ANi+8sDk4Wow=";
|
||||
hash = "sha256-BGmZVBEw7XlgbQcWgRK+qbJS9U4Sm9G8g9m0GRUhmCI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake bison flex python3 ];
|
||||
nativeBuildInputs = [ bison cmake flex python3 ];
|
||||
|
||||
buildInputs = [ spirv-headers spirv-tools spirv-llvm-translator llvm lld ];
|
||||
buildInputs = [ lld llvm spirv-headers spirv-llvm-translator' spirv-tools ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
@ -52,15 +49,6 @@ stdenv.mkDerivation rec {
|
||||
doCheck = false;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace external/SPIRV-Tools/CMakeLists.txt \
|
||||
--replace '$'''{SPIRV-Tools_DIR}../../..' \
|
||||
'${spirv-tools}' \
|
||||
--replace 'SPIRV-Headers_INCLUDE_DIR "/usr/include"' \
|
||||
'SPIRV-Headers_INCLUDE_DIR "${spirv-headers}/include"' \
|
||||
--replace 'set_target_properties(SPIRV-Tools' \
|
||||
'set_target_properties(SPIRV-Tools-shared' \
|
||||
--replace 'IGC_BUILD__PROJ__SPIRV-Tools SPIRV-Tools' \
|
||||
'IGC_BUILD__PROJ__SPIRV-Tools SPIRV-Tools-shared'
|
||||
substituteInPlace IGC/AdaptorOCL/igc-opencl.pc.in \
|
||||
--replace '/@CMAKE_INSTALL_INCLUDEDIR@' "/include" \
|
||||
--replace '/@CMAKE_INSTALL_LIBDIR@' "/lib"
|
||||
@ -71,24 +59,20 @@ stdenv.mkDerivation rec {
|
||||
prebuilds = runCommandLocal "igc-cclang-prebuilds" { } ''
|
||||
mkdir $out
|
||||
ln -s ${clang}/bin/clang $out/
|
||||
ln -s clang $out/clang-${lib.versions.major (lib.getVersion clang)}
|
||||
ln -s ${opencl-clang}/lib/* $out/
|
||||
ln -s ${lib.getLib libclang}/lib/clang/${lib.getVersion clang}/include/opencl-c.h $out/
|
||||
ln -s ${lib.getLib libclang}/lib/clang/${lib.getVersion clang}/include/opencl-c-base.h $out/
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-Wno-dev"
|
||||
"-DVC_INTRINSICS_SRC=${vc_intrinsics_src}"
|
||||
"-DIGC_OPTION__SPIRV_TOOLS_MODE=Prebuilds"
|
||||
"-DCCLANG_BUILD_PREBUILDS=ON"
|
||||
"-DCCLANG_BUILD_PREBUILDS_DIR=${prebuilds}"
|
||||
"-DIGC_PREFERRED_LLVM_VERSION=${lib.getVersion llvm}"
|
||||
"-DIGC_OPTION__SPIRV_TOOLS_MODE=Prebuilds"
|
||||
"-DIGC_OPTION__VC_INTRINSICS_MODE=Source"
|
||||
"-Wno-dev"
|
||||
];
|
||||
|
||||
# causes redefinition of _FORTIFY_SOURCE
|
||||
hardeningDisable = [ "fortify3" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/intel/intel-graphics-compiler";
|
||||
description = "LLVM-based compiler for OpenCL targeting Intel Gen graphics hardware";
|
||||
|
Loading…
Reference in New Issue
Block a user