We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 58f7dc4 + 7ae89b1 commit 13da0b6Copy full SHA for 13da0b6
stdlib/public/Concurrency/CMakeLists.txt
@@ -29,6 +29,15 @@ if(SWIFT_CONCURRENCY_USES_DISPATCH)
29
endif()
30
31
32
+# Linux requires us to link an atomic library to use atomics.
33
+# Frustratingly, in many cases this isn't necessary because the
34
+# sequence is inlined, but we have some code that's just subtle
35
+# enough to turn into runtime calls.
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)
40
+endif()
41
42
add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
43
../CompatibilityOverride/CompatibilityOverride.cpp
0 commit comments