This is an archive of the discontinued LLVM Phabricator instance.

Fix cmake script to allow cross compiling from windows
Needs ReviewPublic

Authored by datcuandrei on May 13 2021, 9:51 AM.

Details

Summary

separate_arguments would fail whenever there would be a space in CMAKE_C_COMPILER, including on Linux.

According to CMake docs, add_custom_command does not guarantee a bash environment. Currently, this is not a problem on Linux, but on Windows we get cmd.exe trying to execute :. With my changes, bash is executed explicitly and it will work even on windows, provided bash.exe is somewhere in PATH.

Diff Detail

Event Timeline

datcuandrei created this revision.May 13 2021, 9:51 AM
datcuandrei requested review of this revision.May 13 2021, 9:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2021, 9:51 AM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript