diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-04 18:32:00 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-04 19:50:34 -0500 |
commit | 7032f6d9503f5945ceee47e7338b8fcd1a0f6f83 (patch) | |
tree | e9bcd466e327b422317b813f720f335e5cab5714 /llvm/runtimes | |
parent | b8fab512e9557dfcc7c886f0bf594f6c1e2f850d (diff) | |
download | llvm-7032f6d9503f5945ceee47e7338b8fcd1a0f6f83.zip llvm-7032f6d9503f5945ceee47e7338b8fcd1a0f6f83.tar.gz llvm-7032f6d9503f5945ceee47e7338b8fcd1a0f6f83.tar.bz2 |
[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
Diffstat (limited to 'llvm/runtimes')
-rw-r--r-- | llvm/runtimes/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index f4c697e..cc5f530 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) |