[llvm] [CMAKE][llvm-libraries] Add Precompiled Headers option to improve build times (PR #91755)
Ameer J via llvm-commits
llvm-commits at lists.llvm.org
Fri May 10 16:45:38 PDT 2024
ameerj wrote:
> You probably should post an RFC on [discourse](https://discourse.llvm.org/) for wider visibility, as this affects essentially everyone.
Thanks for this suggestion! Opened an RFC [here](https://discourse.llvm.org/t/rfc-cmake-adding-an-option-to-enable-precompiled-headers-for-llvm-libraries/78925)
> It looks like PCH is strictly an MSVC thing? but the change in llvm/CMakeLists.txt is executed for all builds, which slows down CMake processing for everyone.
It's most beneficial for MSVC, but PCH is well supported by all major compilers.
The only drawback is its interaction with `ccache`. I have heard of build times being slower with PCH/PCH + `ccache` compared to `ccache` on its own.
I am unable to verify this as I don't develop on any environments that support ccache.
https://github.com/llvm/llvm-project/pull/91755
More information about the llvm-commits
mailing list