[ccache] [PATCH] Support for Clang precompiled headers
joel at rosdahl.net
Thu Jul 12 15:31:08 MDT 2012
On 6 July 2012 19:09, Lubos Lunak <l.lunak at suse.cz> wrote:
> the attached patches modify ccache to also support Clang PCH in addition to
> GCC PCH.
Regarding 0002-hash-clang-s-.pch-file-explicitly.patch: Why is the third
assignment of pch_file done outside the "if (stat(pchpath, &st) == 0)" block?
This means that pch_file and included_pch_file can be set even when there is no
.pch file, so remember_include_file will fail to stat the file and then turn
off the direct mode. The test suite also fails after the patch, but passes if
the pch_file assignment is moved into the block.
The patches look good otherwise.
> PS: Since I've noticed in the archives the recent mail about issues with
> ccache and warnings about unused arguments: The proper way to use ccache with
> Clang is to set CCACHE_CPP2, which not only avoids these warnings, but in
> general Clang works suboptimally if passed preprocessed output (warning/error
> messages quoting sources are affected, some warnings are not supressed in
Do you have any idea about the performance impact of using CCACHE_CPP2 for
More information about the ccache