[clang] [flang] [llvm] [mlir] [polly] [CMake][LLVM] Add PCH infrastructure and LLVMSupport PCH (PR #176420)
Maksim Levental via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 16 10:27:46 PST 2026
makslevental wrote:
> > Regarding the pre-commit CI: sccache appears to not support PCH and I think it would be a good idea to disable PCH in the pre-commit CI to catch missing includes.
>
> Can we instead set `CMAKE_DISABLE_PRECOMPILE_HEADERS=ON` inside `llvm/CMakeLists.txt` if we see that `CMAKE_CXX_COMPILER_LAUNCHER` is set too `sccache`? I use `sccache` locally, and currently, I will need to set `DISABLE_PRECOMPILE_HEADERS` manually, right? I think we should give a warning message if `sccache` + `pch` is activated.
I would prefer not to make this automatic - we have enough "hand-holding/automatic" such variables which cause problems eventually because they wholesale force some behavior for _all_ targets and [all users](https://github.com/llvm/llvm-project/blob/2b903df797f858ed5626bbb5aebd92872322298f/llvm/cmake/modules/HandleLLVMOptions.cmake#L268). A warning is fine.
https://github.com/llvm/llvm-project/pull/176420
More information about the cfe-commits
mailing list