[all-commits] [llvm/llvm-project] 1c9d8a: [libcxx] Add cache file for the GPU build (#99348)

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Aug 21 10:07:48 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1c9d8a62cb208afe1bc87669c7dd5d9590e615b2
      https://github.com/llvm/llvm-project/commit/1c9d8a62cb208afe1bc87669c7dd5d9590e615b2
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    A libcxx/cmake/caches/AMDGPU.cmake
    A libcxx/cmake/caches/NVPTX.cmake

  Log Message:
  -----------
  [libcxx] Add cache file for the GPU build (#99348)

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`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list