You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[LLVM] Add LLVM_<proj>_RUNTIME_TARGETS to set targets per-project
Summary:
Currently, the runtimes build allow users to optionally build for
multiple target architectures via the `LLVM_RUNTIME_TARGETS` option.
Once problem is that this applies to every single runtime the user has
enabled, when it's possible that we may wish to enable a different set
for just one target.
The motivating example here is for handling GPU targets as
cross-compiling. We want to be able to perform something like
`LLVM_RUNTIME_TARGETS=amdgcn-amd-amdhsa;nvptx64-nvidia-cuda` to build
runtimes targeting the GPU. However, the current support would force the
other runtimes to be built for the GPU, when this definitely will not
work.
This patch attempts to work around this in a generic way by letting
individual targets overload the set of enabled runtimes triples. The
expected use would be to enable something like the following for
targeting the GPU `libc` and in the future the GPU `libcxx`.
```
-DLLVM_ENABLE_PROJECTS='openmp;libcxx;libcxx-abi;libc'
-DLLVM_LIBC_RUNTIME_TARGETS='nvptx64-nvidia-cuda;amdgcn-amd-amdhsa'
```
0 commit comments