Merge pull request #171731 from lovesegfault/igm-fixup
intel-graphics-compiler: follow-ups
This commit is contained in:
commit
764bba5aae
2 changed files with 14 additions and 21 deletions
|
@ -54,19 +54,19 @@ stdenv.mkDerivation rec {
|
||||||
# https://github.com/intel/intel-graphics-compiler/issues/98
|
# https://github.com/intel/intel-graphics-compiler/issues/98
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
patchPhase = ''
|
postPatch = ''
|
||||||
substituteInPlace ./external/SPIRV-Tools/CMakeLists.txt \
|
substituteInPlace ./external/SPIRV-Tools/CMakeLists.txt \
|
||||||
--replace '$'''{SPIRV-Tools_DIR}../../..' \
|
--replace '$'''{SPIRV-Tools_DIR}../../..' \
|
||||||
'${spirv-tools}' \
|
'${spirv-tools}' \
|
||||||
--replace 'SPIRV-Headers_INCLUDE_DIR "/usr/include"' \
|
--replace 'SPIRV-Headers_INCLUDE_DIR "/usr/include"' \
|
||||||
'SPIRV-Headers_INCLUDE_DIR "${spirv-headers}/include"' \
|
'SPIRV-Headers_INCLUDE_DIR "${spirv-headers}/include"' \
|
||||||
--replace 'set_target_properties(SPIRV-Tools' \
|
--replace 'set_target_properties(SPIRV-Tools' \
|
||||||
'set_target_properties(SPIRV-Tools-shared' \
|
'set_target_properties(SPIRV-Tools-shared' \
|
||||||
--replace 'IGC_BUILD__PROJ__SPIRV-Tools SPIRV-Tools' \
|
--replace 'IGC_BUILD__PROJ__SPIRV-Tools SPIRV-Tools' \
|
||||||
'IGC_BUILD__PROJ__SPIRV-Tools SPIRV-Tools-shared'
|
'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"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Handholding the braindead build script
|
# Handholding the braindead build script
|
||||||
|
@ -84,7 +84,6 @@ stdenv.mkDerivation rec {
|
||||||
"-Wno-dev"
|
"-Wno-dev"
|
||||||
"-DVC_INTRINSICS_SRC=${vc_intrinsics_src}"
|
"-DVC_INTRINSICS_SRC=${vc_intrinsics_src}"
|
||||||
"-DIGC_OPTION__SPIRV_TOOLS_MODE=Prebuilds"
|
"-DIGC_OPTION__SPIRV_TOOLS_MODE=Prebuilds"
|
||||||
"-DINSTALL_SPIRVDLL=0"
|
|
||||||
"-DCCLANG_BUILD_PREBUILDS=ON"
|
"-DCCLANG_BUILD_PREBUILDS=ON"
|
||||||
"-DCCLANG_BUILD_PREBUILDS_DIR=${prebuilds}"
|
"-DCCLANG_BUILD_PREBUILDS_DIR=${prebuilds}"
|
||||||
"-DIGC_PREFERRED_LLVM_VERSION=${getVersion llvm}"
|
"-DIGC_PREFERRED_LLVM_VERSION=${getVersion llvm}"
|
||||||
|
|
|
@ -19,9 +19,9 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-/vUyL6Wh8hykoGz1QmT1F7lfGDEmG4U3iqmqrJxizOg=";
|
sha256 = "sha256-/vUyL6Wh8hykoGz1QmT1F7lfGDEmG4U3iqmqrJxizOg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config cmake llvm_11.dev ];
|
nativeBuildInputs = [ pkg-config cmake llvm_11.dev spirv-tools ];
|
||||||
|
|
||||||
buildInputs = [ spirv-headers spirv-tools llvm_11 ];
|
buildInputs = [ spirv-headers llvm_11 ];
|
||||||
|
|
||||||
checkInputs = [ lit ];
|
checkInputs = [ lit ];
|
||||||
|
|
||||||
|
@ -34,12 +34,6 @@ stdenv.mkDerivation rec {
|
||||||
"-DLLVM_SPIRV_BUILD_EXTERNAL=YES"
|
"-DLLVM_SPIRV_BUILD_EXTERNAL=YES"
|
||||||
];
|
];
|
||||||
|
|
||||||
prePatch = ''
|
|
||||||
substituteInPlace ./test/CMakeLists.txt \
|
|
||||||
--replace 'SPIRV-Tools' 'SPIRV-Tools-shared'
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
# FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist
|
# FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue