Skip to content

Commit 62a5ebb

Browse files
authored
Update AddSwift.cmake
1 parent ddd003f commit 62a5ebb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,10 @@ function(_add_variant_c_compile_flags)
350350
endif()
351351

352352
if("${CFLAGS_SDK}" STREQUAL "LINUX")
353-
# this is the minimum architecture that supports 16 byte CAS, which is necessary to avoid a dependency to libatomic
354-
list(APPEND result "-march=core2")
353+
if(${CFLAGS_ARCH} STREQUAL x86_64)
354+
# this is the minimum architecture that supports 16 byte CAS, which is necessary to avoid a dependency to libatomic
355+
list(APPEND result "-march=core2")
356+
endif()
355357
endif()
356358

357359
set("${CFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)

0 commit comments

Comments
 (0)