1. Android comes with the CCache version (2.4 version) is too low, is unable to support the above features, need to use the new version of CCache.
2. The latest CCache please go to http://ccache.samba.org/download.html to download
3. After downloading the extract, enter the CCache directory under Linux and run:
./configure
./make
./strip--strip-all CCache
4. You can then see the CCache file in the CCache directory and replace the Alps/prebuilts/misc/linux-x86/ccache/ccache file in codebase with this file.
5. Repeat step 4th to replace all codebase CCache (make sure all CCache using CCache cache are up to date, because different versions of CCache generated cache cannot be shared!). )
6. All users who need to be shared add the following environment variables:
Export Ccache_dir=<ccache Cache path >
Export cache_umask=002
Unset Ccache_hardlink
You can add the above to the $HOME/.BASHRC to ensure that the open terminal has already loaded the above environment variables. Where the <ccache cache path > is replaced with the specified absolute path (must be read and written by the user who needs to be shared). For example:/proj/.ccache
Note: Since multiple people write CCACHE cache may cause insufficient IO bandwidth to reduce efficiency, it is strongly recommended that server compilation can be configured as a 6th step, but it is best for other shared users to add export Ccache_readonly=1 read-only cache content based on step 6th.
7. After setting the 6th step, re-login the terminal to make the environment variable take effect, then create the <ccache cache path, set the <ccache cache path > Share permissions, in Terminal input: Find $CCACHE _dir-type D | Xargs chmod g+s
8. After completing the previous steps, you can start sharing the use, note that the CCache space is large enough, or instead lengthen the compilation time. If you encounter problems, refer to the CCache instructions for use: http://ccache.samba.org/manual.html
Android Compilation shared CCache cache