2
1

ccache-support.txt 1.3 KB

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