ccache的使用

ccache的使用 ,加快第二次编译
原博主文章:https://blog.csdn.net/shui1025701856/article/details/78527151
ccache编译器缓存,第一次编译时ccache缓存了GCC -E输出,把那些头文件展开信息保存在缓存中
当第二次编译时会尽量得用缓存,有改动时会更新缓存
1.安装:
apt-get install ccache
which ccache
/usr/local/bin/ccache
2.导出到环境变量
vi ~/.bashrc
#ccache
export USE_CCACHE=1
export CCACHE_DIR=/home/xx/tools/.ccache
3.设置ccache的大小
ccache -M 50G
4.查看ccache的信息
#ccache -s
cache directory /home/xx/tools/.ccache
cache hit (direct) 79521
cache hit (preprocessed) 2589
cache miss 127838
called for link 29051
called for preprocessing 1687
compile failed 65
preprocessor error 31244
can’t use precompiled header 84
couldn’t find the compiler 3795
unsupported source language 26791
unsupported compiler option 127
no input file 8108
files in cache 373791
cache size 40.4 Gbytes //编译android已经用了40.4个G了
max cache size 50.0 Gbytes
5.清除所有
ccache -C

作者:shui1025701856
来源:CSDN
原文:https://blog.csdn.net/shui1025701856/article/details/78527151
版权声明:本文为博主原创文章,转载请附上博文链接!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值