[PATCH] D85691: lld: link libatomic if needed for Timer
Josh Stone via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 15:10:02 PDT 2020
cuviper created this revision.
cuviper added a reviewer: rnk.
Herald added subscribers: llvm-commits, jfb, mgorny.
Herald added a reviewer: MaskRay.
Herald added a project: LLVM.
cuviper requested review of this revision.
D80298 <https://reviews.llvm.org/D80298> made Timer::total atomic, but this requires linking libatomic
on some targets.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85691
Files:
lld/Common/CMakeLists.txt
Index: lld/Common/CMakeLists.txt
===================================================================
--- lld/Common/CMakeLists.txt
+++ lld/Common/CMakeLists.txt
@@ -1,3 +1,9 @@
+set(LLD_SYSTEM_LIBS ${LLVM_PTHREAD_LIB})
+
+if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
+ list(APPEND LLD_SYSTEM_LIBS atomic)
+endif()
+
find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc)
@@ -50,7 +56,7 @@
Target
LINK_LIBS
- ${LLVM_PTHREAD_LIB}
+ ${LLD_SYSTEM_LIBS}
DEPENDS
intrinsics_gen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85691.284513.patch
Type: text/x-patch
Size: 554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200810/533702d6/attachment.bin>
More information about the llvm-commits
mailing list