mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 01:36:38 +00:00

Summary: This patch adds a CMake cache config file for the GPU build. This cache will set the default required options when used from the LLVM runtime interface or directly. These options pretty much disable everything the GPU can't handle. With this and the following patches: #99259, #99243, #99287, and #99333, we will be able to build `libc++` targeting the GPU with an invocation like this. ``` $ cmake ../llvm -DRUNTIMES_nvptx64-nvidia-cuda_CACHE_FILES=${LLVM_SRC}/../libcxx/cmake/caches/NVPTX.cmake \ -DRUNTIMES_amdgcn-amd-amdhsa_CACHE_FILES=${LLVM_SRC}/../libcxx/cmake/caches/AMDGPU.cmake \ -DRUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES=compiler-rt;libc;libcxx \ -DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=compiler-rt;libc;libcxx \ -DLLVM_RUNTIME_TARGETS=amdgcn-amd-amdhsa;nvptx64-nvidia-cuda \ ``` This will then install the libraries and headers into the appropriate locations for use with `clang`.