r343459 - Build clang-headers when building clang tools.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 05:16:38 PDT 2018


Author: hokein
Date: Mon Oct  1 05:16:38 2018
New Revision: 343459

URL: http://llvm.org/viewvc/llvm-project?rev=343459&view=rev
Log:
Build clang-headers when building clang tools.

Summary:
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`).

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: mgorny, ilya-biryukov, ioeric, kadircet, cfe-commits

Differential Revision: https://reviews.llvm.org/D52714

Modified:
    cfe/trunk/cmake/modules/AddClang.cmake

Modified: cfe/trunk/cmake/modules/AddClang.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/modules/AddClang.cmake?rev=343459&r1=343458&r2=343459&view=diff
==============================================================================
--- cfe/trunk/cmake/modules/AddClang.cmake (original)
+++ cfe/trunk/cmake/modules/AddClang.cmake Mon Oct  1 05:16:38 2018
@@ -131,6 +131,7 @@ macro(add_clang_tool name)
   endif()
 
   add_clang_executable(${name} ${ARGN})
+  add_dependencies(${name} clang-headers)
 
   if (CLANG_BUILD_TOOLS)
     if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR




More information about the cfe-commits mailing list