target_link_libraries(INTERFACE) doesn't bring inter-target dependencies in add_library, although final targets have dependencies to whole dependent libraries. It makes most libraries can be built in parallel. target_link_libraries(PRIVATE) is used to shaared library. Each dependent library is linked to the target.so, and its user will not see its grandchildren. For example, - libclang.so has sufficient libclang*.a(s). - c-index-test requires just only libclang.so. FIXME: lld is tweaked minimally. Adding INTERFACE in each library would be better thing. llvm-svn: 202241
22 lines
387 B
CMake
22 lines
387 B
CMake
add_subdirectory(ELF)
|
|
add_subdirectory(MachO)
|
|
add_subdirectory(Native)
|
|
add_subdirectory(PECOFF)
|
|
add_subdirectory(YAML)
|
|
|
|
set(LLVM_LINK_COMPONENTS object)
|
|
|
|
add_lld_library(lldReaderWriter
|
|
CoreLinkingContext.cpp
|
|
FileArchive.cpp
|
|
LinkerScript.cpp
|
|
Reader.cpp
|
|
Writer.cpp
|
|
FileArchive.cpp
|
|
)
|
|
|
|
target_link_libraries(lldReaderWriter ${cmake_2_8_12_INTERFACE}
|
|
lldCore
|
|
lldPasses
|
|
)
|