[PATCH] D98861: [CMAKE] Fix cross-compilation build
Markus Böck via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 18 05:55:45 PDT 2021
zero9178 added a comment.
Just wondering, what's the current behaviour without these patches? I am aware that if CMAKE_CROSSCOMPILING_EMULATOR is not set, it can't be executed but does configuration automatically fail or does an error appear elsewhere down the line?
================
Comment at: llvm/cmake/modules/GetErrcMessages.cmake:7
function(get_errc_messages outvar)
+ if(CMAKE_CROSSCOMPILING)
+ set(${outvar} "" PARENT_SCOPE)
----------------
I believe this should also check that CMAKE_CROSSCOMPILING_EMULATOR is not set. An emulator can still be used to run the executables.
Typical example for such a platform is emscripten, where it'd use nodejs to run the produced executable. See https://cmake.org/cmake/help/v3.13/command/try_run.html#behavior-when-cross-compiling
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98861/new/
https://reviews.llvm.org/D98861
More information about the llvm-commits
mailing list