ccache(“compiler cache”的缩写)是一个编译器缓存,该工具会高速缓存编译生成的信息,并在编译的特定部分使用高速缓存的信息, 比如头文件,这样就节省了通常使用 cpp 解析这些信息所需要的时间。如果您编译清单 2 中的文件,假定 foobar.h
中包含对其他头文件的引用,ccache 会用那个文件的 cpp-parsed 版本来 取代 include
声明。就那么简单。不是真正去读取、理解并解释其内容,ccache 只是 将最终的文本拷贝到文件中,使得它可以立即被编译。
ccache 3.1.8 ChangeLog:
1. Paths to dependency files are now rewritten into relative order of increased cache hits.
2. A workaround has been added to make ccache work with a buggy GCC 4.1 when creating a pre-compiled header.
3. Clang plugins are now hashed to catch plugin upgrades.
4. ccache no longer crashes when the current working directory has been removed or when stderr is closed.
5. This release corrects a corner case when parsing backslash escapes in string literals.
6. Paths are now correctly canonicalized when computing paths relative to the base directory.
ccache 的详细介绍:请点这里
ccache 的下载地址:请点这里