================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to