forked from OSchip/llvm-project
lld: link libatomic if needed for Timer
D80298 made Timer::total atomic, but this requires linking libatomic on some targets. Reviewed By: aaronpuchert Differential Revision: https://reviews.llvm.org/D85691
This commit is contained in:
parent
f55ad3973d
commit
b26b32b5d3
|
@ -54,6 +54,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|||
include(AddLLVM)
|
||||
include(TableGen)
|
||||
include(HandleLLVMOptions)
|
||||
include(CheckAtomic)
|
||||
|
||||
if(LLVM_INCLUDE_TESTS)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
|
|
|
@ -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 @@ add_lld_library(lldCommon
|
|||
Target
|
||||
|
||||
LINK_LIBS
|
||||
${LLVM_PTHREAD_LIB}
|
||||
${LLD_SYSTEM_LIBS}
|
||||
|
||||
DEPENDS
|
||||
intrinsics_gen
|
||||
|
|
Loading…
Reference in New Issue