Fixes
$ ninja obj/build/rel/gen/clang-tools-extra/clangd/CompletionModel.CompletionModel.obj
Some tablegen include files from clang/include/clang/AST and
clang/include/clang/Sema need to be generated before CompletionModel is
compiled.
Differential D89657
[gn build] Add missing clangd dependencies aeubanks on Oct 18 2020, 1:41 PM. Authored by
Details
Fixes Some tablegen include files from clang/include/clang/AST and
Diff Detail
Event TimelineComment Actions Oh sorry didn't see the question about the proper way. The Right Way to do this in theory: gn check can be used to verify that a target only includes headers from targets in the deps list. You can then put all public headers of a directory in a target and make gn check that all deps are correct. If a target's public headers include generated headers, the public header target would then have a dep on the generation action and everything works well. However, llvm's cmake files don't list .h files in the cmakelist files, and I don't want to keep .h lists updated in the gn build without the cmake ground truth. (Actually, maybe sync_from_cmake.py could sync .h files against disk globs instead?). If we did list .h files, there'd probably be targets for {clang,llvm,...}/include/Foo and every lib target would depend on the header targets it included, or something. This is the "investigate feasibility of gn check" in llvm/utils/gn/TODO.txt. At the moment, the llvm gn bots always build everything and run all tests if any .h file is touched since gn doesn't know about .h files. If it did, https://github.com/nico/hack/blob/master/llvmgnsyncbot/syncbot.py#L143 could not list .h and then a change touching a .h file in clang would only run clang and clang-tidy and clangd and compiler-rt tests, not llvm tests. So that'd be lowkey nice. But for now, I think this here as-is is an ok-if-a-bit-iffy fix. |