android ccache 编译 加速

出处:http://bbs.mfunz.com/thread-686486-1-1.html

启用ccache加速编译android源代码

当你删掉out/target目录或者使用make clean清空输出重新编译源码的时候,编译时间通常都很漫长。


其实这个问题很容易解决,Android官方为我们带来了解决方案–ccache编译器缓存。

官方这么讲:
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do “make clean” often, or if you frequently switch between different build products.

设置方法:
在你home主目录的.bashrc中加入:

export USE_CCACHE=1

如果你需要指定一个特殊的缓存目录,也需要在.bashrc中加入,不指定则为你当前用户目录下的.ccache。

export CCACHE_DIR=/home/mokee/.ccache

在MoKee OpenSource主目录中运行,50G~100G之间手动指定:

prebuilts/misc/linux-x86/ccache/ccache -M 50G

大功告成,开始编译吧!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值