[PATCH] D98861: [CMAKE] Fix cross-compilation build
Vladislav Vinogradov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 18 06:59:27 PDT 2021
vinograd47 updated this revision to Diff 331552.
vinograd47 added a comment.
@zero9178 I've extended the condition to check only the problematic case
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98861/new/
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 AND NOT CMAKE_CROSSCOMPILING_EMULATOR AND NOT DEFINED errc_exit_code)
+ 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.331552.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/13f189ff/attachment.bin>
More information about the llvm-commits
mailing list