mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 10:53:11 +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
|
, runCommandLocal
|
||||||
, bison
|
, bison
|
||||||
, flex
|
, flex
|
||||||
, llvmPackages_11
|
, llvmPackages_14
|
||||||
, opencl-clang
|
, opencl-clang
|
||||||
, python3
|
, python3
|
||||||
, spirv-tools
|
, spirv-tools
|
||||||
@ -19,32 +19,29 @@ let
|
|||||||
vc_intrinsics_src = fetchFromGitHub {
|
vc_intrinsics_src = fetchFromGitHub {
|
||||||
owner = "intel";
|
owner = "intel";
|
||||||
repo = "vc-intrinsics";
|
repo = "vc-intrinsics";
|
||||||
rev = "v0.11.0";
|
rev = "v0.13.0";
|
||||||
sha256 = "sha256-74JBW7qU8huSqwqgxNbvbGj1DlJJThgGhb3owBYmhvI=";
|
hash = "sha256-A9G1PH0WGdxU2u/ODrou53qF9kvrmE0tJSl9cFIOus0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
llvmPkgs = llvmPackages_11 // {
|
inherit (llvmPackages_14) lld llvm;
|
||||||
spirv-llvm-translator = spirv-llvm-translator.override { llvm = llvm; };
|
inherit (if buildWithPatches then opencl-clang else llvmPackages_14) clang libclang;
|
||||||
} // lib.optionalAttrs buildWithPatches opencl-clang;
|
spirv-llvm-translator' = spirv-llvm-translator.override { inherit llvm; };
|
||||||
|
|
||||||
inherit (llvmPackages_11) lld llvm;
|
|
||||||
inherit (llvmPkgs) clang libclang spirv-llvm-translator;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "intel-graphics-compiler";
|
pname = "intel-graphics-compiler";
|
||||||
version = "1.0.12812.26";
|
version = "1.0.14828.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "intel";
|
owner = "intel";
|
||||||
repo = "intel-graphics-compiler";
|
repo = "intel-graphics-compiler";
|
||||||
rev = "igc-${version}";
|
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;
|
strictDeps = true;
|
||||||
|
|
||||||
@ -52,15 +49,6 @@ stdenv.mkDerivation rec {
|
|||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
postPatch = ''
|
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 \
|
substituteInPlace IGC/AdaptorOCL/igc-opencl.pc.in \
|
||||||
--replace '/@CMAKE_INSTALL_INCLUDEDIR@' "/include" \
|
--replace '/@CMAKE_INSTALL_INCLUDEDIR@' "/include" \
|
||||||
--replace '/@CMAKE_INSTALL_LIBDIR@' "/lib"
|
--replace '/@CMAKE_INSTALL_LIBDIR@' "/lib"
|
||||||
@ -71,24 +59,20 @@ stdenv.mkDerivation rec {
|
|||||||
prebuilds = runCommandLocal "igc-cclang-prebuilds" { } ''
|
prebuilds = runCommandLocal "igc-cclang-prebuilds" { } ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
ln -s ${clang}/bin/clang $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 ${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.h $out/
|
||||||
ln -s ${lib.getLib libclang}/lib/clang/${lib.getVersion clang}/include/opencl-c-base.h $out/
|
ln -s ${lib.getLib libclang}/lib/clang/${lib.getVersion clang}/include/opencl-c-base.h $out/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-Wno-dev"
|
|
||||||
"-DVC_INTRINSICS_SRC=${vc_intrinsics_src}"
|
"-DVC_INTRINSICS_SRC=${vc_intrinsics_src}"
|
||||||
"-DIGC_OPTION__SPIRV_TOOLS_MODE=Prebuilds"
|
|
||||||
"-DCCLANG_BUILD_PREBUILDS=ON"
|
"-DCCLANG_BUILD_PREBUILDS=ON"
|
||||||
"-DCCLANG_BUILD_PREBUILDS_DIR=${prebuilds}"
|
"-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; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/intel/intel-graphics-compiler";
|
homepage = "https://github.com/intel/intel-graphics-compiler";
|
||||||
description = "LLVM-based compiler for OpenCL targeting Intel Gen graphics hardware";
|
description = "LLVM-based compiler for OpenCL targeting Intel Gen graphics hardware";
|
||||||
|
Loading…
Reference in New Issue
Block a user