Skip to content

Commit 9228f97

Browse files
committed
[libomptarget-nvptx-bc] Pass found CUDA installations
We already know where the CUDA SDK is, so there is no point in letting Clang search for it again and possibly finding no or a different installation. --cuda-path is supported since the beginning of CUDA support in Clang, so making this required doesn't impose additional restrictions. Differential Revision: https://reviews.llvm.org/D46930 llvm-svn: 332495
1 parent 37bbe1a commit 9228f97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openmp/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ endfunction()
7979

8080
# These flags are required to emit LLVM Bitcode. We check them together because
8181
# if any of them are not supported, there is no point in finding out which are.
82-
set(compiler_flags_required -emit-llvm -O1 --cuda-device-only)
82+
set(compiler_flags_required -emit-llvm -O1 --cuda-device-only --cuda-path=${CUDA_TOOLKIT_ROOT_DIR})
8383
set(compiler_flags_required_src "extern \"C\" __device__ int thread() { return threadIdx.x; }")
8484
check_bitcode_compilation(LIBOMPTARGET_NVPTX_CUDA_COMPILER_SUPPORTS_FLAGS_REQUIRED "${compiler_flags_required_src}" ${compiler_flags_required})
8585

0 commit comments

Comments
 (0)