ccache-support.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. [[ccache]]
  4. Using +ccache+ in Buildroot
  5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. http://ccache.samba.org[ccache] is a compiler cache. It stores the
  7. object files resulting from each compilation process, and is able to
  8. skip future compilation of the same source file (with same compiler
  9. and same arguments) by using the pre-existing object files. When doing
  10. almost identical builds from scratch a number of times, it can nicely
  11. speed up the build process.
  12. +ccache+ support is integrated in Buildroot. You just have to enable
  13. +Enable compiler cache+ in +Build options+. This will automatically
  14. build +ccache+ and use it for every host and target compilation.
  15. The cache is located in +$HOME/.buildroot-ccache+. It is stored
  16. outside of Buildroot output directory so that it can be shared by
  17. separate Buildroot builds. If you want to get rid of the cache, simply
  18. remove this directory.
  19. You can get statistics on the cache (its size, number of hits,
  20. misses, etc.) by running +make ccache-stats+.
  21. The make target +ccache-options+ and the +CCACHE_OPTIONS+ variable
  22. provide more generic access to the ccache. For example
  23. -----------------
  24. # set cache limit size
  25. make CCACHE_OPTIONS="--max-size=5G" ccache-options
  26. # zero statistics counters
  27. make CCACHE_OPTIONS="--zero-stats" ccache-options
  28. -----------------