Skip to content

Commit aa99006

Browse files
Simplify MSVC compatible compiler detection. (#122914)
CMAKE_CXX_SIMULATE_ID indicates the MSVC abi is usable.
1 parent ec9aa4a commit aa99006

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/cmake/modules/GetHostTriple.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Invokes config.guess
33

44
function( get_host_triple var )
5-
if( MSVC OR (CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT MINGW AND NOT MSYS))
5+
if( MSVC OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
66
if( CMAKE_C_COMPILER_ARCHITECTURE_ID MATCHES "ARM64.*" )
77
set( value "aarch64-pc-windows-msvc" )
88
elseif( CMAKE_C_COMPILER_ARCHITECTURE_ID MATCHES "ARM.*" )

0 commit comments

Comments
 (0)