How to use ccache to speed up compiling of aosp?

梦想与她 提交于 2020-05-16 03:24:25

问题


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 ?


回答1:


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



来源:https://stackoverflow.com/questions/59811821/how-to-use-ccache-to-speed-up-compiling-of-aosp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!