[llvm] [LLVM] Add `LLVM_<proj>_RUNTIME_TARGETS` to set targets per-project (PR #81557)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 12:30:53 PST 2024


jhuber6 wrote:

> > So, I think my main problem with the other support is that it forces explicitly adding `default` to the list of enabled. As far as I'm aware, the vast majority of users want the default target when building. Maybe we could just have an alternate way to se them that implies `default` so users don't need to change as much if they want to copy paste something.
> 
> I'm already working on a change for that since this is something I wanted to address for a while, I should have a PR ready later today.

Okay, I will await that one eagerly. If we can get something that makes it just require something like the following, I could wrap this into the existing `LIBC_GPU_BUILD=ON` to simply pre-populate it, as it would then no longer have an effect on the rest of the user's build.
```
-DRUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES=libc
-DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=libc
-DLLVM_EXTRA_RUNTIME_TARGETS=amdgcn-amd-amdhsa;nvptx64-nvidia-cuda
```

https://github.com/llvm/llvm-project/pull/81557


More information about the llvm-commits mailing list