From 2d0bcd754bb9363ca86b8b4dcb4da62e80b37e6b Mon Sep 17 00:00:00 2001 From: iTrooz Date: Thu, 1 Feb 2024 19:31:28 +0100 Subject: [PATCH] ccache: add page (#12152) Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> --- pages/common/ccache.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pages/common/ccache.md diff --git a/pages/common/ccache.md b/pages/common/ccache.md new file mode 100644 index 000000000..0ce2b2b84 --- /dev/null +++ b/pages/common/ccache.md @@ -0,0 +1,21 @@ +# ccache + +> C/C++ compiler cache. +> Note: packages usually provide symlinks for compilers in `/usr/lib/ccache/bin`. Prepend this directory to `$PATH` to automatically use `ccache` for them. +> More information: . + +- Show current cache [s]tatistics: + +`ccache --show-stats` + +- [C]lear all cache: + +`ccache --clear` + +- Reset ([z]ero) statistics (but not cache itself): + +`ccache --zero-stats` + +- Compile C code and cache compiled output (to use `ccache` on all `gcc` invocations, see the note above): + +`ccache gcc {{path/to/file.c}}`