2020-08-18 06:31:32 +08:00
|
|
|
set(LLD_SYSTEM_LIBS ${LLVM_PTHREAD_LIB})
|
|
|
|
|
|
|
|
if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
|
|
|
list(APPEND LLD_SYSTEM_LIBS atomic)
|
|
|
|
endif()
|
|
|
|
|
2019-02-22 02:37:26 +08:00
|
|
|
find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
|
|
|
|
find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc)
|
|
|
|
|
|
|
|
set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
|
2021-09-17 00:27:53 +08:00
|
|
|
set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
|
2019-02-22 02:37:26 +08:00
|
|
|
|
2020-01-17 08:04:08 +08:00
|
|
|
if(lld_vc AND LLVM_APPEND_VC_REV)
|
2019-02-22 02:37:26 +08:00
|
|
|
set(lld_source_dir ${LLD_SOURCE_DIR})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_custom_command(OUTPUT "${version_inc}"
|
|
|
|
DEPENDS "${lld_vc}" "${generate_vcs_version_script}"
|
|
|
|
COMMAND ${CMAKE_COMMAND} "-DNAMES=LLD"
|
2020-01-17 08:04:08 +08:00
|
|
|
"-DLLD_SOURCE_DIR=${lld_source_dir}"
|
2019-02-22 02:37:26 +08:00
|
|
|
"-DHEADER_FILE=${version_inc}"
|
|
|
|
-P "${generate_vcs_version_script}")
|
|
|
|
|
|
|
|
# Mark the generated header as being generated.
|
|
|
|
set_source_files_properties("${version_inc}"
|
|
|
|
PROPERTIES GENERATED TRUE
|
|
|
|
HEADER_FILE_ONLY TRUE)
|
|
|
|
|
2017-10-03 05:00:41 +08:00
|
|
|
add_lld_library(lldCommon
|
2017-11-29 03:58:45 +08:00
|
|
|
Args.cpp
|
2022-01-21 03:53:18 +08:00
|
|
|
CommonLinkerContext.cpp
|
2019-10-21 16:01:52 +08:00
|
|
|
DWARF.cpp
|
[lld] unified COFF and ELF error handling on new Common/ErrorHandler
Summary:
The COFF linker and the ELF linker have long had similar but separate
Error.h and Error.cpp files to implement error handling. This change
introduces new error handling code in Common/ErrorHandler.h, changes the
COFF and ELF linkers to use it, and removes the old, separate
implementations.
Reviewers: ruiu
Reviewed By: ruiu
Subscribers: smeenai, jyknight, emaste, sdardis, nemanjai, nhaehnle, mgorny, javed.absar, kbarton, fedor.sergeev, llvm-commits
Differential Revision: https://reviews.llvm.org/D39259
llvm-svn: 316624
2017-10-26 06:28:38 +08:00
|
|
|
ErrorHandler.cpp
|
2019-03-12 00:30:55 +08:00
|
|
|
Filesystem.cpp
|
2017-11-29 04:39:17 +08:00
|
|
|
Memory.cpp
|
2017-10-03 05:00:41 +08:00
|
|
|
Reproduce.cpp
|
2017-11-28 10:15:26 +08:00
|
|
|
Strings.cpp
|
2017-10-03 05:00:41 +08:00
|
|
|
TargetOptionsCommandFlags.cpp
|
2018-01-18 03:16:26 +08:00
|
|
|
Timer.cpp
|
2019-02-22 02:37:26 +08:00
|
|
|
VCSVersion.inc
|
2017-10-03 05:00:41 +08:00
|
|
|
Version.cpp
|
|
|
|
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
|
|
${LLD_INCLUDE_DIR}/lld/Common
|
|
|
|
|
|
|
|
LINK_COMPONENTS
|
2017-10-03 05:21:36 +08:00
|
|
|
Codegen
|
2017-12-15 06:31:29 +08:00
|
|
|
Core
|
2019-10-21 16:01:52 +08:00
|
|
|
DebugInfoDWARF
|
2017-11-28 16:12:03 +08:00
|
|
|
Demangle
|
2017-10-03 05:32:51 +08:00
|
|
|
MC
|
2017-10-03 05:21:36 +08:00
|
|
|
Option
|
|
|
|
Support
|
|
|
|
Target
|
2017-10-03 12:18:46 +08:00
|
|
|
|
2017-10-17 18:39:27 +08:00
|
|
|
LINK_LIBS
|
2020-08-18 06:31:32 +08:00
|
|
|
${LLD_SYSTEM_LIBS}
|
2017-10-17 18:39:27 +08:00
|
|
|
|
2017-10-03 12:18:46 +08:00
|
|
|
DEPENDS
|
2020-07-18 07:43:05 +08:00
|
|
|
intrinsics_gen
|
2017-10-03 05:00:41 +08:00
|
|
|
)
|