[cfe-dev] Idea for better invoking static analysis via command line
David Chisnall via cfe-dev
cfe-dev at lists.llvm.org
Fri Feb 5 04:26:23 PST 2016
On 4 Feb 2016, at 23:52, via cfe-dev <Alexander G. Riccio> wrote:
>
> Adding a flag to a build is also a much lower barrier to entry to get
> started.
>
> Example #1: I don't have Perl. Not many machines have Perl. That makes scan-build problematic.
>
> "Not many" is relative to Python. Python ate the world.
>
Neither Python nor Perl is in the FreeBSD base system. Additionally, we can very easily add flags to our build system, but we can’t reliably run it to completion with something that interposes on CC, because various things define a different CC for different things.
Having a well-documented set of flags for static analysis would also make it much easier to integrate with systems such as CMake. I’d love to be able to kick off a build in our CI systems for things that use CMake that would do the build and analysis in parallel, with neither blocking the other, and be able to start running tests once the build has finished, even if the static analysis is still ongoing. All of the dependency metadata for doing this exists in our build system, none of it is easily exploited by scan-build (for things that use CMake, all of it could be extracted from the generated JSON, but it would be nicer to just have some separate targets that ninja knew were independent top-level things).
David
More information about the cfe-dev
mailing list