Android源码编译开启ccache缓存
来源:互联网 发布:阿拉伯菜 知乎 编辑:程序博客网 时间:2024/06/05 18:44
当你删掉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.
设置方法:
1. 在你home主目录的.bashrc中加入:
export USE_CCACHE=1
2. 如果你需要指定一个特殊的缓存目录,也需要在.bashrc中加入,不指定则为你当前用户目录下的.ccache。
export CCACHE_DIR=/home/tlh/.ccache (tlh是自己home目录)
3. 在MoKee OpenSource主目录中运行,50G~100G之间手动指定:
prebuilts/misc/linux-x86/ccache/ccache -M 50G (这个地方的ccache命令时Adnroid源码中的不是编译环境中的命令,也就是说我们要找到源码中的ccache命令指定缓存区大小)
4.在修改了~/.bashrc后记得source下,不然刚刚添加的变量不会生效。
5.察看ccache的状态:
ccache -s 察看ccache状态,如下图:
6.结果:
看下图红框中系统使用的是ccache
大功告成,开始吧!
- Android源码编译开启ccache缓存
- Android源码编译开启ccache缓存
- android 编译共享ccache的缓存
- android 编译共享ccache的缓存
- Android 源码编译加速 使用ccache
- Android 源码编译加速 使用ccache
- 使用ccache加快Android源码编译
- 【Android】源码项目编译ccache配置
- 开启ccache缩短编译时间
- android ccache 编译 加速
- Android 编译使用CCACHE
- 通过使用ccache加速android 源码编译的配置
- ccache:利用缓存加速编译过程
- 利用ccache加快android源码和linux内核编译速度的方法
- 启用ccache加速编译android源代码
- android ccache 减少编译的时间
- Android使用ccache减少编译时间
- Android使用ccache减少编译时间
- 笨办法学linux階段小结
- SpringMVC个人总结1
- BSEG和BSIS、BSAS、BSID、BSAD、BSIK、BSAK六个表的关系
- Java中堆内存和栈内存详解
- DP学习 经典例题 三角形最佳路径问题(NOI7625)
- Android源码编译开启ccache缓存
- Wireshark安装及抓本地环路包
- js中时间比较
- ubuntu 16.04 配置java环境变量
- Java 五大框架之间的对比
- Gym-101177B 递归想法题
- IO多路复用机制详解
- Spring Cloud Hystrix
- JPA-style positional param was not an integral ordinal错误解决办法