[llvm] 7032f6d - [libc] Forward CUDA options to the runtimes invocation of `libc`
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 17:50:52 PDT 2023
Author: Joseph Huber
Date: 2023-04-04T19:50:34-05:00
New Revision: 7032f6d9503f5945ceee47e7338b8fcd1a0f6f83
URL: https://github.com/llvm/llvm-project/commit/7032f6d9503f5945ceee47e7338b8fcd1a0f6f83
DIFF: https://github.com/llvm/llvm-project/commit/7032f6d9503f5945ceee47e7338b8fcd1a0f6f83.diff
LOG: [libc] Forward CUDA options to the runtimes invocation of `libc`
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.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D147582
Added:
Modified:
llvm/runtimes/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index f4c697e4746a..cc5f530e7005 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -183,6 +183,10 @@ foreach(entry ${runtimes})
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)
More information about the llvm-commits
mailing list