[libc] Enable integration tests targeting NVIDIA GPUs
authorJoseph Huber <jhuber6@vols.utk.edu>
Sat, 25 Mar 2023 02:00:25 +0000 (21:00 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Mon, 27 Mar 2023 13:47:16 +0000 (08:47 -0500)
commitb26970ec4b79590f41f5e1dd7cb56d5f8d4d9301
treee8ded52c0f19c527232b98d8f7400e7dcd5d3618
parent2e2093aa15a5d2c4ca36e90ee6b1b52c8e49fe6a
[libc] Enable integration tests targeting NVIDIA GPUs

This patch adds the necessary build infrastructure to build and run the
integration tests on NVIDIA GPUs. The NVIDIA `nvlink` linker utility is
what is ultimately used to combine these files into a single executable
image. Unfortunately, their tool does not support static libraries. So
we need to link with every object directly instead. This could be solved
by impelementing a "wrapper" utility around `nvlink` like we used to use
for OpenMP. But for now this should be sufficient.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D146861
libc/cmake/modules/LLVMLibCTestRules.cmake
libc/utils/gpu/loader/CMakeLists.txt