I have a Bazel aspect that is supposed to do C/C++ code analysis. When running the analysis I need all headers, same as when compiling. I've gotten so far as to feed the analysis tooling all the flags it needs, but the files it needs to run the analysis are not in the sandbox.
There are several sets of headers that I need:
- srcs
- hdrs
- deps
- implementation_deps
- toolchain
I can get the srcs and hdrs headers declared in the cc_* rule, and I can probably figure out deps and implementation_deps myself later, but how do I get the toolchain headers?
Looking into bazel-bin I see the .d-files, listing headers and their paths. But I don't know how to get hold of that from the aspect. Or what to do with it if I do.
This question is a follow-up on How to integrate C/C++ analysis tooling in Bazel?