Android compilation and sharing of ccache Cache

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.