[llvm-dev] Incrementally compiling LLVM

Francesco Bertolaccini via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 14 12:58:50 PDT 2021


On 14/04/2021 21:18, David Blaikie wrote:
> Sounds like something's going wrong for sure. How are you measuring
> the time? (how much time is it taking) and what are you testing by
> "partial recompilation"? Touching an ADT .h file is likely to
> recompile nearly everything so might not be much better than a clean
> build - but touching a .cpp file (especially a .cpp file for a single
> tool, rather than a library) might be quite quick. So try timing a
> full clean build (ninja -t clean, ninja clang) and then incrementally
> touching just a .cpp file (eg: clang/tools/driver/driver.cpp  ) and
> see how they compare

I currently do not have sufficient resources to compile LLVM on my
personal machine, so I am (ab?)using GitHub Actions. My workflow is
setup such that the build artifacts are cached and restored on every
worflow run. The time is measured automatically by GitHub itself, and is
around ~2h for each run, whether from scratch or starting from the cache.

I don't generally edit .h files directly, unless they are generated by
modifying TableGen files.

The fact that someone else has successfully been able to do incremental
builds _does_ make it seem like it's a configuration issue on my part.



More information about the llvm-dev mailing list