[PATCH] D52714: Build clang-headers when building clang tools.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 03:25:48 PDT 2018


hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: kadircet, ioeric, ilya-biryukov, mgorny.

clang tools require clang headers to work on real project, e.g. when we
build clangd via `ninja clangd`, we expect the binary can run on
real-world project (without running another command `ninja clang-headers`).


Repository:
  rC Clang

https://reviews.llvm.org/D52714

Files:
  cmake/modules/AddClang.cmake


Index: cmake/modules/AddClang.cmake
===================================================================
--- cmake/modules/AddClang.cmake
+++ cmake/modules/AddClang.cmake
@@ -131,6 +131,7 @@
   endif()
 
   add_clang_executable(${name} ${ARGN})
+  add_dependencies(${name} clang-headers)
 
   if (CLANG_BUILD_TOOLS)
     if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52714.167691.patch
Type: text/x-patch
Size: 371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181001/37e3f4be/attachment-0001.bin>


More information about the cfe-commits mailing list