如何使用ccache加速aosp的编译?

How to use ccache to speed up compiling of aosp?

我在此处 https://android.googlesource.com/toolchain/ccache/ 找到了 ccache aosp 存储库,但我不知道如何在 aosp v10 上使用 ccache,官方 aosp 站点不再有任何关于 ccache 的信息,只有多个版本。 ccache 是否仍适用于最新版本的 aosp?

We no longer provide a ccache prebuilt.

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?

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