Using ccache
ccache is a compiler cache for C and C++ that can help make builds faster. In the root of the source tree, do the following:
ccache 是C與C++的編譯緩存,它可以使得編譯項目更快。在安卓源碼根目錄下,執行下列命令
$ export USE_CCACHE=1
$ export CCACHE_DIR=/<path_of_your_choice>/.ccache
$ prebuilts/misc/linux-x86/ccache/ccache -M 50G
The suggested cache size is 50-100G.
On Linux, you can watch ccache being used by doing the following:
$ watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s