[llvm] [LLVM] Add `LLVM_<proj>_RUNTIME_TARGETS` to set targets per-project (PR #81557)
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 11:54:14 PST 2024
petrhosek wrote:
I'm not I follow, why are other runtimes like `openmp` and `libunwind` being buit for the GPU target if they're not listed in `RUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES='libc'`? Can you post the full set of options you're using?
The reason I'm not a fan of the proposed solution is that it seems to be specifically tailored to libc and I'm worried that it won't generalize. Specifically, runtimes are typically layered on top of each other, that is `libunwind` is built on top of `libc`, `libcxxabi` is built on top of `libunwind`, `libcxx` is built on top of `libcxxabi`, `compiler-rt` is built on top of `libcxx`. Whereas `LLVM_LIBC_RUNTIME_TARGETS='nvptx64-nvidia-cuda;amdgcn-amd-amdhsa'` makes sense since `libc` is the bottommost layer, something like `LLVM_LIBCXXABI_RUNTIME_TARGETS='nvptx64-nvidia-cuda;amdgcn-amd-amdhsa'` likely won't ever be of any use.
In your description, you also mentioned `LLVM_ENABLE_PROJECTS='openmp;libcxx;libcxx-abi;libc'` but that's not even a supported configuration, in particular `libcxx` and `libcxxabi` only support `LLVM_ENABLE_RUNTIMES`, putting them in `LLVM_ENABLE_PROJECTS` will result in an error (that will soon be the case for all runtimes). Can you explain what the intended goal there is? I'd like to see if there's another way we can support this.
https://github.com/llvm/llvm-project/pull/81557
More information about the llvm-commits
mailing list