Skip to content

Commit c83ca6a

Browse files
committed
[build] Remove remaining dependencies on libatomic, for Android, BSD, and Haiku
Follow suit from linux, #29581, tested on Android.
1 parent 5126775 commit c83ca6a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,10 @@ function(_add_variant_link_flags)
417417
list(APPEND library_search_directories
418418
${CMAKE_BINARY_DIR}/winsdk_lib_${LFLAGS_ARCH}_symlinks)
419419
elseif("${LFLAGS_SDK}" STREQUAL "HAIKU")
420-
list(APPEND link_libraries "bsd" "atomic")
420+
list(APPEND link_libraries "bsd")
421421
list(APPEND result "-Wl,-Bsymbolic")
422422
elseif("${LFLAGS_SDK}" STREQUAL "ANDROID")
423-
list(APPEND link_libraries "dl" "log" "atomic")
423+
list(APPEND link_libraries "dl" "log")
424424
# We need to add the math library, which is linked implicitly by libc++
425425
list(APPEND result "-lm")
426426

stdlib/public/core/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,13 @@ else()
256256
endif()
257257
endif()
258258

259-
if(SWIFT_PRIMARY_VARIANT_SDK STREQUAL ANDROID)
260-
# workaround for libatomic needing to be after object files for swiftCore.so
261-
list(APPEND swift_core_private_link_libraries atomic)
262-
elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL CYGWIN)
259+
if(SWIFT_PRIMARY_VARIANT_SDK STREQUAL CYGWIN)
263260
# TODO(compnerd) cache this variable to permit re-configuration
264261
execute_process(COMMAND "cygpath" "-u" "$ENV{SYSTEMROOT}" OUTPUT_VARIABLE ENV_SYSTEMROOT)
265262
list(APPEND swift_core_private_link_libraries "${ENV_SYSTEMROOT}/system32/psapi.dll")
266263
elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL FREEBSD)
267264
find_library(EXECINFO_LIBRARY execinfo)
268265
list(APPEND swift_core_private_link_libraries ${EXECINFO_LIBRARY})
269-
# workaround for libatomic needing to be after object files for swiftCore.so
270-
list(APPEND swift_core_private_link_libraries
271-
${SWIFTLIB_DIR}/clang/lib/freebsd/libclang_rt.builtins-${SWIFT_PRIMARY_VARIANT_ARCH}.a)
272266
elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL LINUX)
273267
if(SWIFT_BUILD_STATIC_STDLIB)
274268
list(APPEND swift_core_private_link_libraries swiftImageInspectionShared)

0 commit comments

Comments
 (0)