[libc] Search for the CUDA patch explicitly when testing
authorJoseph Huber <jhuber6@vols.utk.edu>
Wed, 5 Apr 2023 19:16:53 +0000 (14:16 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 5 Apr 2023 20:14:47 +0000 (15:14 -0500)
commit9f5c6dcf595229fccf08a5c8acfbb1ac01cd85f9
tree42f6aa822be05d22cc91d3d8512109a64c72a988
parente787ef86634553131f8e47bd8eaaede987cf20e2
[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
libc/cmake/modules/LLVMLibCObjectRules.cmake
libc/cmake/modules/LLVMLibCTestRules.cmake
libc/cmake/modules/prepare_libc_gpu_build.cmake
libc/startup/gpu/nvptx/CMakeLists.txt
libc/test/IntegrationTest/CMakeLists.txt