Skip to content

Commit d4a4a32

Browse files
gktrkluismarques
authored andcommitted
[Support] Check for atomics64 when deciding if '-latomic' is needed
The CheckAtomic module performs two tests to determine if passing '-latomic' to the linker is required: one for 64-bit atomics, and another for non-64-bit atomics. Include the missing check for 64-bit atomics. Reviewers: beanz, compnerd Reviewed By: beanz, compnerd Tags: #llvm Differential Revision: https://reviews.llvm.org/D69444
1 parent b0866f6 commit d4a4a32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ elseif( CMAKE_HOST_UNIX )
2626
set(system_libs ${system_libs} ${TERMINFO_LIBS})
2727
endif()
2828
endif()
29-
if( LLVM_ENABLE_THREADS AND HAVE_LIBATOMIC )
29+
if( LLVM_ENABLE_THREADS AND (HAVE_LIBATOMIC OR HAVE_CXX_LIBATOMICS64) )
3030
set(system_libs ${system_libs} atomic)
3131
endif()
3232
set(system_libs ${system_libs} ${LLVM_PTHREAD_LIB})

0 commit comments

Comments
 (0)