llvm.org GIT mirror llvm / 80b1dd8
[cmake] Determine MSVC host triple correctly when cross-compiling CMAKE_CL_64 will never be set when cross-compiling with clang-cl, since CMake relies on an actual VS environment in order to determine it. Instead, use the size of a void pointer to determine the bit width of the host compiler (and therefore the host triple), which works for both native and cross compilation. Note that, with the impending advent of Windows on AArch64, assuming that a 64-bit host == x86_64 isn't correct either, but that's something to be addressed in a follow-up. Differential Revision: https://reviews.llvm.org/D41155 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320615 91177308-0d34-0410-b5e6-96231b3b80d8 Shoaib Meenai 1 year, 9 months ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
33 function( get_host_triple var )
44 if( MSVC )
5 if( CMAKE_CL_64 )
66 set( value "x86_64-pc-win32" )
77 else()
88 set( value "i686-pc-win32" )