Skip to content

Commit

Permalink
GPU: OpenCL build should pass PATH of llvm-spirv to clang, since clan…
Browse files Browse the repository at this point in the history
…g looks only in the /usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/17/bin:/usr/lib/llvm/16/bin:/usr/lib/llvm/15/bin:/usr/lib64/subversion/bin:/opt/vmware/bin:/opt/vmware/sbin:/etc/eselect/wine/bin:/opt/cuda/bin:/opt/cuda/libnvvp:/home/qon/scripts at runtime
  • Loading branch information
davidrohr committed Oct 27, 2023
1 parent 0266dbd commit 5b4a79e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GPU/GPUTracking/Base/opencl2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ set(HDRS GPUReconstructionOCL2.h GPUReconstructionOCL2Internals.h)
if(OPENCL2_ENABLED_SPIRV) # BUILD OpenCL2 intermediate code for SPIR-V target
# executes clang to create llvm IL code
# Add -fintegrated-objemitter once we switch to clang >= 17
cmake_path(GET LLVM_SPIRV PARENT_PATH TMP_LLVM_SPIRV_PATH)
add_custom_command(
OUTPUT ${CL_BIN}.spirv
COMMAND ${LLVM_CLANG}
COMMAND PATH+=:${TMP_LLVM_SPIRV_PATH} ${LLVM_CLANG}
-O0
--target=spirv64
${OCL_FLAGS}
Expand Down

0 comments on commit 5b4a79e

Please sign in to comment.