Skip to content

Commit 0d8e005

Browse files
authored
Merge pull request #79754 from compnerd/cx16
build: only apply `-mcx16` on X86 CPUs
2 parents f66e7a5 + 40bf17c commit 0d8e005

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Runtimes/Core/cmake/modules/CompilerSettings.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ if(NOT HAVE_SWIFT_ASYNC_CALL)
4949
endif()
5050

5151
check_compiler_flag(CXX "-mcx16" HAVE_CXX_MCX16)
52-
if(HAVE_CXX_MCX16)
52+
if(HAVE_CXX_MCX16 AND
53+
(CMAKE_CXX_COMPILER_ARCHITECTURE_ID MATCHES "(X86)|(X64)" OR
54+
CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86)|(x86_64)|(amd64)|(AMD64)"))
5355
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-mcx16>)
5456
endif()

0 commit comments

Comments
 (0)