[llvm] [BOLT] Enable cross compilation of runtime libraries (PR #101180)

Gergely Bálint via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 2 07:53:22 PDT 2024


================
@@ -136,35 +135,60 @@ if (LLVM_INCLUDE_TESTS)
 endif()
 
 if (BOLT_ENABLE_RUNTIME)
-  message(STATUS "Building BOLT runtime libraries for X86")
+  if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+    set(HOST_NAME "X86")
+  elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+    set(HOST_NAME "AArch64")
+  elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
+    set(HOST_NAME "RISCV")
+  endif()
+
+  foreach(tgt ${BOLT_TARGETS_TO_BUILD})
+    message(STATUS "Building BOLT runtime libraries for ${tgt}")
   set(extra_args "")
   if(CMAKE_SYSROOT)
     list(APPEND extra_args -DCMAKE_SYSROOT=${CMAKE_SYSROOT})
   endif()
----------------
bgergely0 wrote:

Fixed in the new version.

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


More information about the llvm-commits mailing list