[llvm] [BOLT] Enable cross compilation of runtime libraries (PR #101180)
Peter Waller via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 06:44:56 PDT 2024
Gergely =?utf-8?q?Bálint?= <gergely.balint at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/101180 at github.com>
================
@@ -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()
----------------
peterwaller-arm wrote:
Does this code need indenting to reflect the new for loop? (and more below, at least in the github diff UI, the indentation looks inconsistent)
https://github.com/llvm/llvm-project/pull/101180
More information about the llvm-commits
mailing list