1 set(LLD_SYSTEM_LIBS ${LLVM_PTHREAD_LIB})
3 if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
4 list(APPEND LLD_SYSTEM_LIBS atomic)
7 find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
8 find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc)
10 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
11 set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
13 if(lld_vc AND LLVM_APPEND_VC_REV)
14 set(lld_source_dir ${LLD_SOURCE_DIR})
17 add_custom_command(OUTPUT "${version_inc}"
18 DEPENDS "${lld_vc}" "${generate_vcs_version_script}"
19 COMMAND ${CMAKE_COMMAND} "-DNAMES=LLD"
20 "-DLLD_SOURCE_DIR=${lld_source_dir}"
21 "-DHEADER_FILE=${version_inc}"
22 -P "${generate_vcs_version_script}")
24 # Mark the generated header as being generated.
25 set_source_files_properties("${version_inc}"
26 PROPERTIES GENERATED TRUE
27 HEADER_FILE_ONLY TRUE)
29 add_lld_library(lldCommon
31 CommonLinkerContext.cpp
38 TargetOptionsCommandFlags.cpp
43 ADDITIONAL_HEADER_DIRS
44 ${LLD_INCLUDE_DIR}/lld/Common