Skip to content

Commit 40bf17c

Browse files
committed
build: only apply -mcx16 on X86 CPUs
This is required to support compilation for non-X86 architectures.
1 parent c937aa0 commit 40bf17c

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)