[lld] r202241 - [CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to increase opportunity for parallel build.
NAKAMURA Takumi
geek4civic at gmail.com
Tue Feb 25 22:53:18 PST 2014
Author: chapuni
Date: Wed Feb 26 00:53:16 2014
New Revision: 202241
URL: http://llvm.org/viewvc/llvm-project?rev=202241&view=rev
Log:
[CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to increase opportunity for parallel build.
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.
Modified:
lld/trunk/lib/Core/CMakeLists.txt
lld/trunk/lib/ReaderWriter/CMakeLists.txt
Modified: lld/trunk/lib/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/CMakeLists.txt?rev=202241&r1=202240&r2=202241&view=diff
==============================================================================
--- lld/trunk/lib/Core/CMakeLists.txt (original)
+++ lld/trunk/lib/Core/CMakeLists.txt Wed Feb 26 00:53:16 2014
@@ -11,7 +11,7 @@ add_lld_library(lldCore
SymbolTable.cpp
)
-target_link_libraries(lldCore
+target_link_libraries(lldCore ${cmake_2_8_12_INTERFACE}
lldNative
lldYAML
)
Modified: lld/trunk/lib/ReaderWriter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/CMakeLists.txt?rev=202241&r1=202240&r2=202241&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/CMakeLists.txt Wed Feb 26 00:53:16 2014
@@ -15,7 +15,7 @@ add_lld_library(lldReaderWriter
FileArchive.cpp
)
-target_link_libraries(lldReaderWriter
+target_link_libraries(lldReaderWriter ${cmake_2_8_12_INTERFACE}
lldCore
lldPasses
)
More information about the llvm-commits
mailing list