[llvm] [LLVM][runtimes] Prepopulate `LLVM_BUILTIN_TARGETS` with runtimes values (PR #95554)

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 16:21:11 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()
----------------
petrhosek wrote:

> I'm not sure that applying DRY here is worth it. I'd rather just duplicate the `builtin_default_target` invocation and remove the string handling for "default".

I have a WIP change that removes the `"default"` altogether since that part is a relic, but it needs some more testing to make sure I don't break any of existing configurations.

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


More information about the llvm-commits mailing list