[llvm] [LLVM][runtimes] Prepopulate `LLVM_BUILTIN_TARGETS` with runtimes values (PR #95554)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 10:18:56 PDT 2024
================
@@ -138,37 +142,44 @@ endfunction()
# before the just-built compiler can pass the configuration tests.
get_compiler_rt_path(compiler_rt_path)
if(compiler_rt_path)
- if(NOT LLVM_BUILTIN_TARGETS)
+ # If the user did not specify the targets infer them from the runtimes.
+ set(builtin_targets ${LLVM_BUILTIN_TARGETS})
+ if(NOT builtin_targets)
+ if("compiler-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
+ list(APPEND builtin_targets "default")
+ endif()
----------------
jhuber6 wrote:
We need the following case to work,
```
-DLLVM_ENABLE_RUNTIMES=compiler-rt \
-DRUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES=compiler-rt \
-DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=compiler-rt \
-DLLVM_RUNTIME_TARGETS="default;amdgcn-amd-amdhsa;nvptx64-nvidia-cuda"
```
Honestly I think we should get rid of the distinction between the "default" target, but that's a much larger refactoring I think @petrhosek wanted to do.
https://github.com/llvm/llvm-project/pull/95554
More information about the llvm-commits
mailing list