From c3604743def1f2a2f90f2e74c74ae68c519ece9e Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 8 Mar 2025 08:19:37 -0800 Subject: [PATCH] Runtimes: tweak incorrect case (NFC) This adjusts the spelling for the architecture specifier for the Windows compilers. Take the opportunity to further restrict the compiler check to micro-optimize the CMake configure phase. --- Runtimes/Core/cmake/modules/CompilerSettings.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Runtimes/Core/cmake/modules/CompilerSettings.cmake b/Runtimes/Core/cmake/modules/CompilerSettings.cmake index b400dd4a6e4d7..f7014aa3a0fe3 100644 --- a/Runtimes/Core/cmake/modules/CompilerSettings.cmake +++ b/Runtimes/Core/cmake/modules/CompilerSettings.cmake @@ -48,9 +48,10 @@ if(NOT HAVE_SWIFT_ASYNC_CALL) message(SEND_ERROR "CXX Compiler must support Swift async calling conventions") endif() -check_compiler_flag(CXX "-mcx16" HAVE_CXX_MCX16) -if(HAVE_CXX_MCX16 AND - (CMAKE_CXX_COMPILER_ARCHITECTURE_ID MATCHES "(X86)|(X64)" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86)|(x86_64)|(amd64)|(AMD64)")) - add_compile_options($<$:-mcx16>) +if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID MATCHES "(x86)|(x64)" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86)|(x86_64)|(amd64)|(AMD64)") + check_compiler_flag(CXX "-mcx16" HAVE_CXX_MCX16) + if(HAVE_CXX_MCX16) + add_compile_options($<$:-mcx16>) + endif() endif()