2017-10-03 12:18:46 +08:00
|
|
|
if(NOT LLD_BUILT_STANDALONE)
|
|
|
|
set(tablegen_deps intrinsics_gen)
|
|
|
|
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")
|
|
|
|
set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
|
|
|
|
|
|
|
|
if(lld_vc)
|
|
|
|
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"
|
|
|
|
"-DLLD_SOURCE_DIR=${LLD_SOURCE_DIR}"
|
|
|
|
"-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)
|
|
|
|
|
|
|
|
set_property(SOURCE Version.cpp APPEND PROPERTY
|
|
|
|
COMPILE_DEFINITIONS "HAVE_VCS_VERSION_INC")
|
|
|
|
|
2017-10-03 05:00:41 +08:00
|
|
|
add_lld_library(lldCommon
|
2017-11-29 03:58:45 +08:00
|
|
|
Args.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
|
2017-10-14 02:22:55 +08:00
|
|
|
Threads.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
|
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
|
|
|
|
${LLVM_PTHREAD_LIB}
|
|
|
|
|
2017-10-03 12:18:46 +08:00
|
|
|
DEPENDS
|
|
|
|
${tablegen_deps}
|
2017-10-03 05:00:41 +08:00
|
|
|
)
|