如何使用ccache加快aosp的编译速度? [英] How to use ccache to speed up compiling of aosp?

查看:549
本文介绍了如何使用ccache加快aosp的编译速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里> https://android.googlesource.com/toolchain/ccache找到了ccache aosp存储库/,但我不知道如何在aosp v10上使用ccache,aosp官方网站不再提供任何有关ccache的信息,只有多个版本. ccache是​​否仍可与aosp的最新版本一起使用?

I found the ccache aosp repo here https://android.googlesource.com/toolchain/ccache/, but I have no idea how to use ccache on aosp v10, the official aosp site doesn't have any info abouut ccache anymore, only multiple builds. Does ccache still work with recent versions of aosp ?

推荐答案

我们不再提供预构建的缓存.

We no longer provide a ccache prebuilt.

我们的年龄较大,并且遇到了许多导致无法复制的问题 结果和其他故障.较新的ccache版本可能会解决其中一些问题 问题,但是在我们的大型构建服务器上,我们没有看到 使用ccache可显着提高性能-您最终需要非常 良好的本地性和/或超大型缓存(如果您要构建许多不同的缓存) 配置.

Ours was old, and had a number of issues that triggered non-reproducible results and other failures. Newer ccache versions may fix some of those issues, but at the large scale of our build servers, we weren't seeing significant performance gains from using ccache -- you end up needing very good locality and/or very large caches if you're building many different configurations.

本地无更改的完整重建显示出更好的结果,但为什么不只是 在那个时候使用增量构建?

Local no-change full rebuilds were showing better results, but why not just use incremental builds at that point?

因此,如果您仍然想使用ccache,请继续设置USE_CCACHE,但还要进行设置 CCACHE_EXEC环境变量指向您的ccache可执行文件的路径.

So if you still want to use ccache, continue setting USE_CCACHE, but also set the CCACHE_EXEC environment variable to the path to your ccache executable.

https://cs.android.com/android/platform/superproject/+/android10-release:build/make/core/ccache.mk;l=17

这篇关于如何使用ccache加快aosp的编译速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆