[PATCH] [CMake] Update required version to 2.8.12 to improve build time with target_link_libraries(INTERFACE)

NAKAMURA Takumi geek4civic at gmail.com
Sun Feb 23 08:25:36 PST 2014


This patch introduces target_link_libraries(INTERFACE|PRIVATE) to parallelize building libraries.
With this on manycore host, built time from clean could be reduced much.

This requires the feature in CMake-2.8.12.

For example on Opteron 4x16 cores 2.5GHz (6380) to build clang,

  $ time ninja clang

trunk (r201978)
  real    2m20.779s
  user    63m8.007s
  sys     3m2.697s

This patch
  real    1m27.150s
  user    68m56.874s
  sys     2m28.777s
40% reduced.

This requires dependencies for generated headers of each library should be up-to-date.
This is one of reasons why I once removed dependencies in clang libraries.
(I am working for another patch to evolve handling dependencies)

Changes to compiler-rt and lld are minimal. I could improve them if this were landed.

This is also available from https://github.com/chapuni/llvm-project/commits/cmake/cmp0023

http://llvm-reviews.chandlerc.com/D2864

Files:
  clang-tools-extra/clang-apply-replacements/CMakeLists.txt
  clang-tools-extra/clang-modernize/Core/CMakeLists.txt
  clang-tools-extra/clang-query/CMakeLists.txt
  clang-tools-extra/clang-tidy/CMakeLists.txt
  clang-tools-extra/clang-tidy/google/CMakeLists.txt
  clang-tools-extra/clang-tidy/llvm/CMakeLists.txt
  clang/CMakeLists.txt
  clang/lib/ARCMigrate/CMakeLists.txt
  clang/lib/AST/CMakeLists.txt
  clang/lib/ASTMatchers/CMakeLists.txt
  clang/lib/ASTMatchers/Dynamic/CMakeLists.txt
  clang/lib/Analysis/CMakeLists.txt
  clang/lib/CodeGen/CMakeLists.txt
  clang/lib/Driver/CMakeLists.txt
  clang/lib/Edit/CMakeLists.txt
  clang/lib/Format/CMakeLists.txt
  clang/lib/Frontend/CMakeLists.txt
  clang/lib/FrontendTool/CMakeLists.txt
  clang/lib/Index/CMakeLists.txt
  clang/lib/Lex/CMakeLists.txt
  clang/lib/Parse/CMakeLists.txt
  clang/lib/Rewrite/Core/CMakeLists.txt
  clang/lib/Rewrite/Frontend/CMakeLists.txt
  clang/lib/Sema/CMakeLists.txt
  clang/lib/Serialization/CMakeLists.txt
  clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
  clang/lib/StaticAnalyzer/Core/CMakeLists.txt
  clang/lib/StaticAnalyzer/Frontend/CMakeLists.txt
  clang/lib/Tooling/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  lld/lib/Core/CMakeLists.txt
  lld/lib/ReaderWriter/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/cmake/modules/AddLLVM.cmake
  llvm/cmake/modules/LLVM-Config.cmake
  llvm/lib/LineEditor/CMakeLists.txt
  llvm/lib/Support/CMakeLists.txt
  llvm/utils/unittest/CMakeLists.txt
  llvm/utils/unittest/UnitTestMain/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2864.1.patch
Type: text/x-patch
Size: 17135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140223/9319f7b7/attachment.bin>


More information about the cfe-commits mailing list