[BOLT] Fix cross-compilation build

Don't enable BOLT runtime when cross compiling as we don't
support this scenario yet.

Differential Revision: https://reviews.llvm.org/D158906
This commit is contained in:
Rafael Auler 2023-08-25 15:54:39 -07:00
parent 1376dfa32c
commit b9deec1cd9

View File

@ -35,7 +35,8 @@ set(BOLT_ENABLE_RUNTIME_default OFF)
if ((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64"
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
AND (CMAKE_SYSTEM_NAME STREQUAL "Linux"
OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
AND (NOT CMAKE_CROSSCOMPILING))
set(BOLT_ENABLE_RUNTIME_default ON)
endif()
option(BOLT_ENABLE_RUNTIME "Enable BOLT runtime" ${BOLT_ENABLE_RUNTIME_default})