Questions tagged [ccache]

ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Supported languages are C, C++, Objective-C and Objective-C++.

The source code is hosted on GitHub:

The home page for the project (with links to documentation and downloads) is:

105 questions
2
votes
1 answer

Android ccache sharing among workspaces

I want to share the ccache built using one workspace to be utilized by another workspace, so that one copy of ccache data is used for compiling identical source code. E.x: 1) Created a workspace (home/user/source_code1). 2) synced the code here…
Jose
  • 1,333
  • 5
  • 20
  • 38
2
votes
2 answers

Caching options with Waf (WAFCACHE and/or ccache)

For a project, where Waf is used, I want to try some build speedup. I see that waf has a WAFCACHE option. So, is WAFCACHE sufficient, or do I need to setup ccache additionally ? (can they work together), or does WAFCACHE[internally] makes use of…
Ani
  • 1,448
  • 1
  • 16
  • 38
2
votes
2 answers

Using gcc along with ccache

I was thinking about using ccache with gcc compiled code on the team wide base (same ccache's cache will be used by all developers on the same machine). Since we're talking about commercial product, "correctness" of compilation is a top…
dimba
  • 26,717
  • 34
  • 141
  • 196
1
vote
0 answers

ccache-swig : wrong size and over limit

We use ccache-swig on small server used for CI compilations. Stats reports that everything is ok. ]$ ccache-swig -s cache directory PATH/.ccache cache hit 18345 cache miss …
Paul Zakharov
  • 515
  • 2
  • 15
1
vote
1 answer

How to use ccache on a bjam project

I would like to use ccache for a build done with bjam and gcc as its toolset. As this answer suggests ccache needs the compilation and linker call in separate steps to work correctly. However bjam is performing those in a single step. How can I…
eL.
  • 311
  • 1
  • 2
  • 15
1
vote
0 answers

ccache: error: configuration setting "cache_dir" must not be the empty string

I'm using Buildroot to add a package, it shows the following error in buiding step cmake3 --build . --target install --config Release ... ccache: error: configuration setting "cache_dir" must not be the empty string ninja: build stopped: subcommand…
kinder chen
  • 1,371
  • 5
  • 15
  • 25
1
vote
1 answer

Problem with ccache after changing branches with larger diff

I'm compiling my app with ccache enabled. Everything works fine until I change my repo's branch to the one with bigger diff. Flow: Compiling branch X for the first time (ccache cached everything) - compilation time about 3min Compiling branch X…
AnDevi
  • 67
  • 7
1
vote
3 answers

Configure Ccache to only use secondary storage?

How can I configure Ccache to only use secondary storage as it's cache and completely skip primary storage? Our CI pipelines use containers to compile and build our C++ application. We want to use Ccache to reduce build times and want the cache to…
Maarten Bamelis
  • 2,243
  • 19
  • 32
1
vote
0 answers

Why does ccache fail compiler invocation?

I have the following clang invocation over cmake, with launcher ccache: Variable clang="clang.sh" which forwards everything to /usr/local/opt/llvm@12/bin/clang++. cd…
Gabriel
  • 8,990
  • 6
  • 57
  • 101
1
vote
1 answer

Jenkins + Kubernetes + ccache

We are considering moving Jenkins to Kubernetes (GKE) and using Jenkins Kubernetes plugin to run job in pods. However, our build infra uses ccache for build speed optimization and we keep ccache files on the jenkins agents (every build reads and…
Cube
  • 11
  • 1
1
vote
1 answer

Hit rate 0.00 % for cache in GitHub Actions CI

I have a dummy C++ project for which I have the following github actions config: name: CI on: [push, pull_request] # on all pushes and PRs jobs: dummy: runs-on: ubuntu-latest strategy: matrix: distro:…
harsh
  • 905
  • 1
  • 10
  • 21
1
vote
2 answers

How to use `ccache -s` to show hit rates for different CCACHE_DIR

When I use ccache -s, I get like this. root@iZwz98um4r4f2aucz24e1yZ:~# ccache -s cache directory /root/.ccache primary config /root/.ccache/ccache.conf secondary config (readonly) …
losy
  • 11
  • 1
1
vote
0 answers

How to set up and use ccache (with cygwin) on windows?

I am not able to set up Ccache on Windows using Cygwin. What do i want to do ? I want to install CCache on a Windows PC so i could use it to compile C and C++ projects. I have almost no Knowledge about C/C++ and the whole GCC/G++ Compiler…
Saturas
  • 535
  • 1
  • 4
  • 12
1
vote
0 answers

Use clcache with Incredibuild

I'm trying to speed up compilation by using ClCache together with Incredibuild. I've configured ClCache by replacing the cl.exe with the ClCache.exe. However, when using incredibuild it tries to execute tasks on a helper, but it never uses its…
Lorenz Rusch
  • 384
  • 2
  • 8
1
vote
1 answer

ccache with MingW on Windows

I am trying to use ccache however I get this error when I try to compile my project: ccache: FATAL: Unable to determine cache directory I download the file from here, How can I know the appropriate directory that ccache use.
SIFE
  • 5,567
  • 7
  • 32
  • 46