diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-05 14:16:53 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-05 15:14:47 -0500 |
commit | 9f5c6dcf595229fccf08a5c8acfbb1ac01cd85f9 (patch) | |
tree | 42f6aa822be05d22cc91d3d8512109a64c72a988 /libc/startup | |
parent | e787ef86634553131f8e47bd8eaaede987cf20e2 (diff) | |
download | llvm-9f5c6dcf595229fccf08a5c8acfbb1ac01cd85f9.tar.gz |
[libc] Search for the CUDA patch explicitly when testing
The packaged version of the `libc` library does not depend on the CUDA
installation because it only uses `clang` and emits LLVM-IR. However,
for testing we directly need the CUDA toolkit to emit and execute the
files. This patch explicitly passes `--cuda-path` to the relevant
compilations for NVPTX testing.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D147653
Diffstat (limited to 'libc/startup')
-rw-r--r-- | libc/startup/gpu/nvptx/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/startup/gpu/nvptx/CMakeLists.txt b/libc/startup/gpu/nvptx/CMakeLists.txt index 0fe0b2d7f7e6..f8839e967415 100644 --- a/libc/startup/gpu/nvptx/CMakeLists.txt +++ b/libc/startup/gpu/nvptx/CMakeLists.txt @@ -10,6 +10,7 @@ add_startup_object( -nogpulib # Do not include any GPU vendor libraries. -march=${LIBC_GPU_TARGET_ARCHITECTURE} --target=${LIBC_GPU_TARGET_TRIPLE} + --cuda-path=${LIBC_CUDA_ROOT} NO_GPU_BUNDLE # Compile this file directly without special GPU handling. ) get_fq_target_name(crt1 fq_name) @@ -19,4 +20,5 @@ target_link_libraries(${fq_name} PUBLIC "-march=${LIBC_GPU_TARGET_ARCHITECTURE}" "--target=${LIBC_GPU_TARGET_TRIPLE}" + "--cuda-path=${LIBC_CUDA_ROOT}" ) |