Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -106,36 +106,7 @@ endif() macro(add_lld_library name) - llvm_process_sources(srcs ${ARGN}) - if (MSVC_IDE OR XCODE) - string(REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR}) - list(GET split_path -1 dir) - file(GLOB_RECURSE headers - ../../include/lld${dir}/*.h) - set(srcs ${srcs} ${headers}) - endif() - if (MODULE) - set(libkind MODULE) - elseif (SHARED_LIBRARY) - set(libkind SHARED) - else() - set(libkind) - endif() - add_library(${name} ${libkind} ${srcs}) - llvm_update_compile_flags(${name} ${srcs}) - if (LLVM_COMMON_DEPENDS) - add_dependencies(${name} ${LLVM_COMMON_DEPENDS}) - endif() - - target_link_libraries(${name} ${LLVM_USED_LIBS}) - llvm_config(${name} ${LLVM_LINK_COMPONENTS}) - target_link_libraries(${name} ${LLVM_COMMON_LIBS}) - - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - install(TARGETS ${name} - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) - endif() + add_llvm_library(${name} ${ARGN}) set_target_properties(${name} PROPERTIES FOLDER "lld libraries") endmacro(add_lld_library)