[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
Wed Aug 28 08:55:32 PDT 2024
ameerj wrote:
I'm considering closing this PR as I no longer have as much time to dedicate to maintaining this feature, and the generated header include dependency is likely to be a persistent problem.
> How do you test the benefit from having certain headers in the precompiled header?
The file that dictates which headers are in the PCH is `llvm/include/llvm/PrecompiledHeaders.h`
And the targets which get PCH enabled are defined by the `LLVM_LIB_DIRETORIES_FOR_PRECOMPILED_HEADERS` CMAKE variable, which is defaulted here:
https://github.com/llvm/llvm-project/pull/91755/files#diff-b83c4d42b091505d0a1b49796e517447063ae9d1914054290eac3ce18750ca36R68-R81
Comparing generated/non-generated in the PCH is tricky because of the include dependencies.
i.e. including a non-generated header that may get modified to include a generated header.
https://github.com/llvm/llvm-project/pull/91755
More information about the llvm-commits
mailing list