[RFC] Adding LibTooling to Clang binary as a dependency

Dear cfe-dev,

It looks like there is a general interest in the community to have support for writing tools that have cross translation capabilities unit based on Clang.

The Static Analyzer community is working towards adding cross translation unit analysis support for the Analyzer (https://reviews.llvm.org/D30691). Some of the changes are independent of the Analyzer and could be reused in any tools that required cross-TU capabilities (https://reviews.llvm.org/D34512).

For this reason, we considered adding this functionality to the LibTooling component. However, this would also introduce LibTooling as a dependency of the Clang binary, since the Static Analyzer is the part of Clang.

I run some quick benchmarks about the binary size (using static linking on Linux).

Release: 85457072 → 85505864

Debug: 1777932672 → 1779938696

The increase is about 0,1% in the worst case. This can also mean slightly increased link times and the clang binary needs to be recompiled when there is a tooling related change.

The question is, is it ok for the community to have this dependency or should we introduce a new component instead of putting this functionality in LibTooling?

Regards,

Gábor