[compiler-rt] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [openmp] [Runtimes] Introduce variables containing resource dir paths (PR #177953)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 03:55:11 PDT 2026


================
@@ -113,5 +111,18 @@ function (get_toolchain_arch_dirname outvar)
   else()
     set(target "${arch}${triple_suffix}")
   endif()
-  set(${outvar} "${target}" PARENT_SCOPE)
+  set("${variable}" "${target}" PARENT_SCOPE)
+endfunction()
+
+
+# Corresponds to Clang's ToolChain::getRuntimePath().
+function (get_toolchain_arch_dirname outvar)
+  string(FIND "${LLVM_TARGET_TRIPLE}" "-" dash_index)
+  string(SUBSTRING "${LLVM_TARGET_TRIPLE}" 0 "${dash_index}" triple_cpu)
+  set(arch "${triple_cpu}")
+  if("${arch}" MATCHES "^i.86$")
+    set(arch "i386")
+  endif()
----------------
Meinersbur wrote:

https://github.com/llvm/llvm-project/blob/7ce634ac0451e367e0c465ff7a05a68a14c5ad98/compiler-rt/cmake/Modules/CompilerRTUtils.cmake#L407-L412

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


More information about the llvm-commits mailing list