CFamily incremental analysis WITH incremental compilation

Hi,

First of all, it’s great to have incremental analysis which greatly reduced analysis time for our cfamily projects. Thanks!

I wonder if it will ever be possible to do an incremental build during build-wrapper trigger, instead of a full clean build.

In below thread, it’s suggested that we must use a full compilation:

I don’t know the internal details, but given that incremental analysis will do analysis for only changed files, I wonder if it would be somehow adequate for build-wrapper to observe compilation of only these changed files.

@mpaladin, you have suggested in above thread to use ccache for this. IIRC, ccache speeds up clean build by serving previously compiled objects from it’s cache. Relying on this, I assume build-wrapper does not really need to observe actual compilation itself, but rather the compiler command that is triggered.

If that’s the case, would a dry-run clean build which outputs all compiler commands but does not poke compiler itself work?

This question is a bit vague I know, and maybe asking too much details. But I want to understand what’s the actual limitation that requires a clean build, and what makes ccache work, even though it does not perform actual compilation, and only serves cached output of compiler command.

Thanks

Hi @manuyavuz-pointr,

At the time being we don’t support incremental build.

Correct, compiler commands with its environment.

Unless your build generates some files needed to succeed the compilation a dry-run would make the job.

ccache is pretty good and somehow it makes incremental build support less of a priority for us. We are using ourself ccache plus incremental analysis to dogfood our analyzer.

2 Likes

@mpaladin thanks for details!

We have integrated ccache to our build, and it works great! Thanks for help!

I think this can be closed as there is a legitimate workaround for the problem.

Hi @manuyavuz-pointr,

great, thank you for the update!