ccache
-
Installing ccache and using it is not as complicated as you might think .
安装和使用ccache并不像您可能想像的那样复杂。
-
You can improve compile times even more when using ccache in combination with distcc .
组合使用ccache和distcc,您可以更进一步地改进编译时间。
-
To download the latest version ( 2.4 ) of ccache , see the Resources section .
要下载ccache的最新版本(2.4),请参考参考资料小节。
-
The following are some of the environment variables you can use to customize the ccache setup
下面是一些可用于自定义ccache安装的环境变量
-
Use ccache to further speed up compilation
使用ccache进一步提高编译速度
-
CC sets the name of the C compiler to use in the first instance ( ccache ) .
CC设置首先使用的C编译器的名称(ccache)。
-
As previously mentioned , the effects of ccache won 't be felt on the first compilation .
如前所述,在第一次编译时,ccache的影响不会为人所察觉。
-
As mentioned above , ccache works by sitting between you and your normal compiler .
如上所述,ccache在您与您的普通编译器之间进行工作。
-
You can use ccache with or without distcc .
使用ccache时,可以带有distcc,也可以不带。
-
Here 's a ample make invocation with ccache and distcc
下面是一个使用ccache和distcc的make调用示例
-
CCACHE_TEMPDIR & Specifies the folder where ccache puts temporary files that it generates .
CCACHETEMPDIR&指定放置ccache生成的临时文件的文件夹。
-
The simplest usage of ccache is as follows : ccache g + + - o
ccache最简单的用法如下:ccacheg++-o
-
CCACHE_DIR specifies the location of the ccache directory .
CCACHEDIR指定了高速缓存目录的位置。
-
We need something meaty to compile , because ccache works best when it has cached the parsed header files .
我们需要编译一个足够大的项目,因为ccache在高速缓存了解析过的头文件时运转效果最好。
-
CCACHE_PREFIX & Adds a prefix to the command line that ccache uses to invoke the compiler proper .
CCACHEPREFIX&向ccache用于完全调用编译器的命令行添加一个前缀。
-
CCACHE_DIR & Specifies the folder where ccache stores the precompiled outputs .
CCACHEDIR&指定ccache存储预编译输出的文件夹。
-
CCACHE_LOGFILE & If set , tells ccache to record the hit and miss statistics from the cache in this file .
CCACHELOGFILE&设置这个选项告诉ccache随机记录该文件在缓存中的统计信息。
-
CCACHE_DISABLE & If set , tells ccache to invoke the compiler proper , bypassing the cache .
CCACHEDISABLE&设置这个选项告诉ccache完全调用编译器,从而绕过缓存。
-
By default , ccache uses a directory within the current user 's home directory ( $ HOME / . ccache ) to hold the cache information .
默认情况下,ccache使用当前用户主目录中的一个目录($HOME/.ccache)来保持高速缓存信息。
-
In this article , you 've seen how much of a speed improvement you can obtain from a relatively straightforward and easy-to-use tool such as ccache .
在本文中,您已经了解了通过ccache等相当直观而且易用的工具可以获得怎样的速度上的提高。
-
This is a common convention , but not a requirement as you can see from / usr / lib / ccache .
这是一个常见的习惯,但是正如/usr/lib/ccache一样,不是必须要求。
-
CCACHE_PREFIX defines a prefix to use when ccache calls the true compiler to compile the source ( after preprocessing ) .
CCACHEPREFIX定义了当ccache调用真实的编译器来编译源文件(预处理之后)时所使用的前缀。
-
If you are using ccache across a network of machines , make sure the directory you share is exported over NFS and mounted on each client .
如果您是在网络中多台机器上使用ccache,那么要确保您共享的目录要通过NFS导出(export)并挂载到每一个客户机上。
-
You can also use ccache , a tool that drastically reduces the time it takes to clean-build a system , often by a factor of5 to10 .
还可以使用ccache,这个工具能大大减少编译清理时间(减少到原来的五分之一至十分之一)。
-
This article has delved into the GNU make , distcc , and ccache tools , which can help you parallelize the build process .
本文探讨了GNUmake、distcc和ccache,这些工具能够并行分布编译过程。
-
If ccache isn 't installed in / usr / bin , verify that the ccache location is defined as part of the PATH environment variable .
如果ccache没有安装在/usr/bin,则检查ccache的位置是否定义为PATH环境变量的一部分。
-
To use distcc and ccache in this way , configure distcc on your hosts and distcc and ccache on your main development machine .
要以这种方式来使用distcc和ccache,需要在主机上配置distcc,在主要的开发机器上配置distcc和ccache。
-
Ccache makes the first check to decide whether the copy in the local cache suffices ; otherwise , it hands the baton to distcc for distributed compilation .
ccache进行第一次检查,确定副本是否存在本地缓存中;如果不存在,就由distcc进行分布式编译。
-
While recompiling , if ccache detects no changes in the preprocessed source and compiler options , it retrieves its cached copy of the previously compiled output .
在重新编译时,如果ccache未在预处理源代码和编译器选项中检测到任何更改,它就检索以前编译输出的缓存副本。
-
CCACHE_RECACHE & If set , tells ccache to ignore the existing entries in the cache and calls the compiler ; but for new entries , it caches the result .
CCACHERECACHE&设置这个选项告诉ccache忽略缓存中现有的条目并调用编译器;但对于新的条目,则缓存结果。