[PATCH] D147582: [libc] Forward CUDA options to the runtimes invocation of `libc`
Joseph Huber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 16:33:05 PDT 2023
jhuber6 created this revision.
jhuber6 added reviewers: tra, sivachandra, lntue, michaelrj, jdoerfert.
Herald added subscribers: mattd, ecnelises, tschuett, yaxunl.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Some configurations may require `-DCUDAToolkit_ROOT` to find CUDA
properly. This is currently not forwarded to the CMake invocation. This
patch adds a prefix so it will be visible when the runtimes build is
started.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147582
Files:
llvm/runtimes/CMakeLists.txt
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -183,6 +183,10 @@
if(canon_name STREQUAL "LIBC")
list(APPEND prefixes "LLVM_LIBC")
list(APPEND prefixes "LIBC_")
+ # The `libc` project may require '-DCUDAToolkit_ROOT' in GPU mode.
+ if(LIBC_GPU_BUILD OR LIBC_GPU_ARCHITECTURES)
+ list(APPEND prefixes "CUDA")
+ endif()
endif()
string(FIND ${projName} "lib" LIB_IDX)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147582.510961.patch
Type: text/x-patch
Size: 525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230404/65471ea9/attachment.bin>
More information about the llvm-commits
mailing list