Can I update Clang static analyzer without linking Clang?

Hello,

I’m writing a Clang static analyzer to print data flow in source code level. Every time I make some modification to the analyzer code, Clang will be linked again. That is too time-consuming.

Is there is a way to make the analyzer compiled into a dynamic-link library so I don’t have to link clang? I’m using ‘clang -cc1 -analyzer -analyzer-checker XXX X.c’ to invoke the analyzer.

Thank you!

Xiayang

You can set the LLVM build to use dynamic libraries instead of static ones, which might help with link times (but for most developers this tends to be a loss, since the dynamically linked llvm/clang/etc run so much slower that the time saved in linking is spent (and some extra) when running the tests (lots of small invocations of these programs with many dynamic libraries slows things down))