Is it possible to compile Clang LibTooling into standalone library?

158 Views Asked by At

I`m trying to find best solution for parsing C++ code for my refactor support tool. I decided to use clang frontend because it is meant to be frontend of C++ compiler. I found the documentation page that describes parsing of C++ code using clang LibTooling. But, unfortunately, it looks for me that LibTooling cannot be used separately from clang infrastructure installed on the tool user side.

So, my question: is it possible to compile Clang LibTooling to standalone parser that my be reused between C++ parse projects without clang infrastructure? Ideal solution for me is shown on the picture. I want to compile LibTooling linking it with my wrapping library (that may simplify / adopt LibTooling API for my purposes) and then reuse it between different projects.

P.S.: Maybe, something like it where performed in Firolino's clang project - but it looks that full clang installation should be used for too.

P.P.S.: As for me, solution that is wanted for my may be useful for all C++ community. So if somebody want to cooperate with me in making this project - you are welcome!

enter image description here

0

There are 0 best solutions below