[compiler-rt] [compiler-rt] Initial support for builtins on GPU targets (PR #95304)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 08:08:27 PDT 2024
jhuber6 wrote:
I removed the version check for now since I have no clue why it's failing and it's not strictly necessary. I updated some logic to make the default configuration work when targeted directly. The patch https://github.com/llvm/llvm-project/pull/95554 fixes the issues I had with enabling it.
@yxsamliu with both of these patches, the following build should work.
```console
$ cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang;lld \
-DRUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES=compiler-rt;libc \
-DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=compiler-rt;libc \
-DLLVM_RUNTIME_TARGETS=default;amdgcn-amd-amdhsa;nvptx64-nvidia-cuda \
```
This will create `$<install>/lib/clang/19/lib/amdgcn-amd-amdhsa/libclang_rt.builtins.a`. I propose in the future that the `clang` driver simply checks for the existence of this directory and links it in if present. This is the resource directory so it's tied to the installation.
https://github.com/llvm/llvm-project/pull/95304
More information about the llvm-commits
mailing list