Skip to content

Commit 36090fa

Browse files
authored
Merge pull request #34757 from buttaface/atomic
[build] Remove remaining dependencies on libatomic, for Android, BSD and Haiku
2 parents c4abccb + 8574fe7 commit 36090fa

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,10 @@ function(_add_target_variant_link_flags)
402402
list(APPEND library_search_directories
403403
${CMAKE_BINARY_DIR}/winsdk_lib_${LFLAGS_ARCH}_symlinks)
404404
elseif("${LFLAGS_SDK}" STREQUAL "HAIKU")
405-
list(APPEND link_libraries "bsd" "atomic")
405+
list(APPEND link_libraries "bsd")
406406
list(APPEND result "-Wl,-Bsymbolic")
407407
elseif("${LFLAGS_SDK}" STREQUAL "ANDROID")
408-
list(APPEND link_libraries "dl" "log" "atomic")
408+
list(APPEND link_libraries "dl" "log")
409409
# We need to add the math library, which is linked implicitly by libc++
410410
list(APPEND result "-lm")
411411

stdlib/public/core/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,19 +259,13 @@ else()
259259
endif()
260260
endif()
261261

262-
if(SWIFT_PRIMARY_VARIANT_SDK STREQUAL ANDROID)
263-
# workaround for libatomic needing to be after object files for swiftCore.so
264-
list(APPEND swift_core_private_link_libraries atomic)
265-
elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL CYGWIN)
262+
if(SWIFT_PRIMARY_VARIANT_SDK STREQUAL CYGWIN)
266263
# TODO(compnerd) cache this variable to permit re-configuration
267264
execute_process(COMMAND "cygpath" "-u" "$ENV{SYSTEMROOT}" OUTPUT_VARIABLE ENV_SYSTEMROOT)
268265
list(APPEND swift_core_private_link_libraries "${ENV_SYSTEMROOT}/system32/psapi.dll")
269266
elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL FREEBSD)
270267
find_library(EXECINFO_LIBRARY execinfo)
271268
list(APPEND swift_core_private_link_libraries ${EXECINFO_LIBRARY})
272-
# workaround for libatomic needing to be after object files for swiftCore.so
273-
list(APPEND swift_core_private_link_libraries
274-
${SWIFTLIB_DIR}/clang/lib/freebsd/libclang_rt.builtins-${SWIFT_PRIMARY_VARIANT_ARCH}.a)
275269
elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL LINUX)
276270
if(SWIFT_BUILD_STATIC_STDLIB)
277271
list(APPEND swift_core_private_link_libraries)

0 commit comments

Comments
 (0)