Android compilation and sharing of ccache Cache
1. The ccache version (version 2.4) that comes with android is too low to support the above features. You need to use the new version of ccache.
2. For the latest ccache, please download it at http://ccache.samba.org/download.html.
3. After downloading and decompressing the package, go to the ccache directory under linux and run:
./Configure
./Make
./Strip -- strip-all ccache
4. Then you can see the ccache file under the ccache directory, replace this file with the alps/prebuilts/misc/linux-x86/ccache file in codebase.
5. Please repeat Step 1 to replace all the ccache of codebase (ensure that all ccache cached with ccache is the latest version, because the cache generated by ccache of different versions cannot be shared !)
6. Add the following environment variables for all users to share:
Export CCACHE_DIR =
Export CACHE_UMASK = 002
Unset CCACHE_HARDLINK
You can add the above to $ HOME/. bashrc to ensure that all opened terminals have loaded the above environment variables. Where Replace it with the specified absolute path (it must be shared by all users ). For example:/proj/. ccache
Note: Because multiple users write the ccache cache at the same time, the I/O bandwidth may be insufficient, but the efficiency may be reduced. We strongly recommend that you configure the cache in step 1 for server compilation, however, it is recommended that other sharing users add export CCACHE_READONLY = 1 to read-only cached content based on step 1.
7. After step 4 is set, log on to the terminal again to make the environment variable take effect, and then create , Set In the terminal, enter: find $ CCACHE_DIR-type d | xargs chmod g + s
8. After completing the preceding steps, you can start sharing. Note that the ccache space is large enough; otherwise, the Compilation Time is extended. If you encounter problems, refer to the use of ccache instructions: http://ccache.samba.org/manual.html