[PATCH] D158906: [BOLT] Fix cross-compilation build

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 16:09:03 PDT 2023


rafauler created this revision.
rafauler added a reviewer: bolt.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
rafauler requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158906

Files:
  bolt/CMakeLists.txt


Index: bolt/CMakeLists.txt
===================================================================
--- bolt/CMakeLists.txt
+++ bolt/CMakeLists.txt
@@ -35,7 +35,8 @@
 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})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158906.553659.patch
Type: text/x-patch
Size: 566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230825/acf3fd07/attachment.bin>


More information about the llvm-commits mailing list