[llvm] [LLVM] Provide a default 'multilibs.yaml' when configured (PR #192281)
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 09:20:09 PDT 2026
================
@@ -717,6 +708,56 @@ if(build_runtimes)
EXTRA_ARGS TARGET_TRIPLE ${name} ${extra_args})
endforeach()
endforeach()
+
+ # Generate a default multilib.yaml for each runtime target that has one.
+ if(LLVM_RUNTIME_MULTILIBS)
+ set(_multilib_yaml_outputs)
+ foreach(name ${LLVM_RUNTIME_TARGETS})
+ set(_multilibs_for_target)
+ foreach(multilib ${LLVM_RUNTIME_MULTILIBS})
+ if("${name}" IN_LIST LLVM_RUNTIME_MULTILIB_${multilib}_TARGETS)
+ list(APPEND _multilibs_for_target "${multilib}")
+ endif()
+ endforeach()
+
+ # Generate the file into a temporary. We only copy this if the user has
+ # not provided one either in the build tree or the install directory.
+ if(_multilibs_for_target)
+ set(_yaml "MultilibVersion: 1.0\n\nVariants:\n- Dir: .\n Flags: []\n")
----------------
petrhosek wrote:
Can you use https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#bracket-argument instead of `\n` to make this more readable?
https://github.com/llvm/llvm-project/pull/192281
More information about the llvm-commits
mailing list