Skip to content

Commit f0b451c

Browse files
thesamesammgorny
authored andcommitted
Link liblldCOFF against libatomic when necessary
Also simplify code for liblldCommon using the new LLVM_ATOMIC_LIB variable. Depends on D136280. Bug: https://bugs.gentoo.org/832675 Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Tested-by: erhard_f@mailbox.org <erhard_f@mailbox.org> Differential Revision: https://reviews.llvm.org/D136281
1 parent fa981b5 commit f0b451c

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

lld/COFF/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ add_lld_library(lldCOFF
4444
LINK_LIBS
4545
lldCommon
4646
${LLVM_PTHREAD_LIB}
47+
${LLVM_ATOMIC_LIB}
4748

4849
DEPENDS
4950
COFFOptionsTableGen

lld/Common/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
set(LLD_SYSTEM_LIBS ${LLVM_PTHREAD_LIB})
2-
3-
if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
4-
list(APPEND LLD_SYSTEM_LIBS atomic)
5-
endif()
6-
71
find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
82
find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc)
93

@@ -54,7 +48,8 @@ add_lld_library(lldCommon
5448
Target
5549

5650
LINK_LIBS
57-
${LLD_SYSTEM_LIBS}
51+
${LLVM_PTHREAD_LIB}
52+
${LLVM_ATOMIC_LIB}
5853

5954
DEPENDS
6055
intrinsics_gen

0 commit comments

Comments
 (0)