From 8305a944bf669e5b7390842867ab60fec982e4b2 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Tue, 14 Jan 2025 14:42:43 +0000 Subject: [PATCH] Simplify MSVC compatible compiler detection. CMAKE_CXX_SIMULATE_ID indicates the MSCV abi is usable. Change-Id: I6112f7282400c45b140c44c3f46ac7ea8f97c9ee --- llvm/cmake/modules/GetHostTriple.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/cmake/modules/GetHostTriple.cmake b/llvm/cmake/modules/GetHostTriple.cmake index e58d5b1ef14d4..2a2f84ada098f 100644 --- a/llvm/cmake/modules/GetHostTriple.cmake +++ b/llvm/cmake/modules/GetHostTriple.cmake @@ -2,7 +2,7 @@ # Invokes config.guess function( get_host_triple var ) - if( MSVC OR (CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT MINGW AND NOT MSYS)) + if( MSVC OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") if( CMAKE_C_COMPILER_ARCHITECTURE_ID MATCHES "ARM64.*" ) set( value "aarch64-pc-windows-msvc" ) elseif( CMAKE_C_COMPILER_ARCHITECTURE_ID MATCHES "ARM.*" )