[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:43:53 PDT 2020


cuviper updated this revision to Diff 284519.
cuviper added a comment.

More whitespace cleanup


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85691/new/

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.284519.patch
Type: text/x-patch
Size: 550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200810/2a87c9f4/attachment.bin>


More information about the llvm-commits mailing list