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

llvm-svn: 343459
This commit is contained in:
Haojian Wu 2018-10-01 12:16:38 +00:00
parent a60aa91374
commit 06098849c6
1 changed files with 1 additions and 0 deletions

View File

@ -131,6 +131,7 @@ macro(add_clang_tool name)
endif() endif()
add_clang_executable(${name} ${ARGN}) add_clang_executable(${name} ${ARGN})
add_dependencies(${name} clang-headers)
if (CLANG_BUILD_TOOLS) if (CLANG_BUILD_TOOLS)
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR