[PATCH] D85691: lld: link libatomic if needed for Timer
Josh Stone via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 15:33:12 PDT 2020
cuviper updated this revision to Diff 286158.
cuviper added a comment.
include(CheckAtomic) for standalone builds
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.286158.patch
Type: text/x-patch
Size: 872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200817/0005c486/attachment.bin>
More information about the llvm-commits
mailing list