Skip to content

Commit 34ae88e

Browse files
authored
Merge pull request #38508 from rjmccall/link-libatomic-concurrency-2
Fix `-latomic` linking condition, include android
2 parents ea146ac + 2ff1719 commit 34ae88e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ endif()
3333
# Frustratingly, in many cases this isn't necessary because the
3434
# sequence is inlined, but we have some code that's just subtle
3535
# enough to turn into runtime calls.
36-
if(SWIFT_HOST_VARIANT STREQUAL "Linux")
37-
if(SWIFT_HOST_VARIANT_ARCH MATCHES "armv6|armv7|i686")
38-
list(APPEND swift_concurrency_link_libraries
39-
atomic)
40-
endif()
36+
if(SWIFT_HOST_VARIANT STREQUAL "linux" OR
37+
SWIFT_HOST_VARIANT STREQUAL "android")
38+
list(APPEND SWIFT_RUNTIME_CONCURRENCY_SWIFT_LINK_FLAGS
39+
-latomic)
4140
endif()
4241

4342
add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB

0 commit comments

Comments
 (0)