[PATCH] D85691: lld: link libatomic if needed for Timer
Josh Stone via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 17:48:06 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb26b32b5d3b8: lld: link libatomic if needed for Timer (authored by cuviper).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85691/new/
https://reviews.llvm.org/D85691
Files:
lld/CMakeLists.txt
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
Index: lld/CMakeLists.txt
===================================================================
--- lld/CMakeLists.txt
+++ lld/CMakeLists.txt
@@ -54,6 +54,7 @@
include(AddLLVM)
include(TableGen)
include(HandleLLVMOptions)
+ include(CheckAtomic)
if(LLVM_INCLUDE_TESTS)
if(CMAKE_VERSION VERSION_LESS 3.12)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85691.287141.patch
Type: text/x-patch
Size: 872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200822/b5ec88c9/attachment.bin>
More information about the llvm-commits
mailing list