The clangd lit configuration adds a depedency on Clang, so we also need
to add a build dependency to make check-clangd work when you start
from a clean build.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This would be pretty unfortunate for iteration times: in my workspace having just run ninja check-clangd, ninja clang has 1450 additional build steps remaining. (All of which would get frequently invalidated e.g. by changes to common LLVM headers).
clangd/test/lit.cfg.py mentions clang, our intent here is configure some common required variables etc, not depend clang itself. It's not very well-defined though :-(
I'm pretty sure it used to work at some point, but now after a clean:
llvm-lit: /usr/local/google/home/sammccall/src/llvm-project/llvm/utils/lit/lit/llvm/config.py:342: fatal: couldn't find 'clang' program, try setting CLANG in your environment
Looking at the contents of llvm/config.py, it's getting the builtin includes directory in order to use it in lit substitutions like %clang_cc1. Which of course we don't use in clangd tests.
I'm trying to remember exactly why we do need to use this module at all, but I suspect there was a real reason.
I think we're going to need to refactor llvm/config.py a little to let us take the bits we want. I can have a dig into this soon...
D90528 should solve this in a cheaper way. Thanks for raising this though!
@kbobyrev @kadircet we were thinking about adding a buildbot with grpc/remote index enabled. Maybe we should have that one build check-clangd only, and not clang?
It would be a little faster and it would ensure this configuration doesn't break in future.