[PATCH] D98861: [CMAKE] Fix cross-compilation build
Vladislav Vinogradov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 18 05:49:37 PDT 2021
vinograd47 created this revision.
vinograd47 added reviewers: zero9178, abhina.sreeskantharajan, jhenderson.
Herald added a subscriber: mgorny.
vinograd47 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Do not call `try_run` in `get_errc_messages` function in case of cross-compilation build.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98861
Files:
llvm/cmake/modules/GetErrcMessages.cmake
Index: llvm/cmake/modules/GetErrcMessages.cmake
===================================================================
--- llvm/cmake/modules/GetErrcMessages.cmake
+++ llvm/cmake/modules/GetErrcMessages.cmake
@@ -4,6 +4,11 @@
# Messages are semi colon separated.
# Keep amount, order and tested error codes in sync with llvm/utils/lit/lit/llvm/config.py.
function(get_errc_messages outvar)
+ if(CMAKE_CROSSCOMPILING)
+ set(${outvar} "" PARENT_SCOPE)
+ message(STATUS "Can't get errc messages in cross-compilation mode")
+ return()
+ endif()
set(errc_test_code ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/getErrc.cpp)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98861.331534.patch
Type: text/x-patch
Size: 662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/62ced171/attachment.bin>
More information about the llvm-commits
mailing list