[llvm] [CMake] Handle clang in MSVC mode in GetHostTriple (PR #116701)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 02:55:54 PST 2025


mstorsjo wrote:

Btw, there's another way of detecting Clang in MSVC mode, while using the GNU command line. Currently we do this as `(WIN32 AND NOT MINGW)` or similar, but there's also `CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"` which should trigger for both `clang` (in MSVC mode) and `clang-cl`, but not `clang` in mingw mode. See https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_SIMULATE_ID.html for docs, and https://discourse.cmake.org/t/clang-on-windows-detected-with-msvc-interface/3470/3 for a concrete example.

https://github.com/llvm/llvm-project/pull/116701


More information about the llvm-commits mailing list