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
3
votes
3 answers

What is the fastest way to get just the preprocessed source code with MSVC?

I'm trying to find the fastest way to get the complete preprocessed source code (I don't need #line information other comments, just the raw source code) for a C source file. I have the following little test program which just includes the Windows…
Frerich Raabe
  • 90,689
  • 19
  • 115
  • 207
3
votes
2 answers

'ccache' configuration

I have a question related to ccache configuration. In our development environment we have hundreds of make files that build objects using absolute paths. I wanted to speed up the process and use ccache. Unfortunately when compiling from different…
user3801620
  • 41
  • 1
  • 5
3
votes
1 answer

Incorrect ar and strip when cmake cross-compiling with ccache

I cross-compiled one project witch ccache: cmake -G"Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_TOOLCHAIN_FILE=mips64el-toolchain.cmake The following is mips64el-toolchain.cmake: SET (CMAKE_SYSTEM_NAME Linux) SET…
Like
  • 1,470
  • 15
  • 21
3
votes
1 answer

ccache BASEDIR (shared) configuration

Environment is Ubuntu 12 I have two different versions of the same build. one located under /media/CM10/custom the other under /home/malachi/CM10/android/system I have a specialized build-setup.sh which is invoked by the main build process and…
Malachi
  • 2,260
  • 3
  • 27
  • 40
2
votes
1 answer

Why ccache works if build systems like Make or Ninja already handle dependencies

Build systems like Make or Ninja should be able to handle the dependencies and re-compile only the part affected by changes. Then why ccache helps? I understand that ccache and build systems work in different ways. ccache looks into the file content…
liuzikai
  • 23
  • 2
2
votes
0 answers

Using ccache with Stan models

I've found that compiling Stan models is kind of slow, and I'm often recompiling the same model "to avoid crashing R session". It seems like ccache would be a great solution here -- I could cache the result of compilation, can R could reload the…
karldw
  • 361
  • 3
  • 12
2
votes
0 answers

Can I speed up IWYU with CCache?

I'm developing a project which uses CMake for build system generation, CCache for speeding up the build (set via CMAKE_CXX_COMPILER_LAUNCHER), and Include What You Use for tidying up the required headers (set via…
2
votes
0 answers

ccache - all files are "no input file"

I'm using ccache version 3.7.4 compiled by me like this: ccache compiler [compiler options] but it doesn't seem to work cache hit (direct) 0 cache hit (preprocessed) 0 cache miss 0 cache…
Musmus
  • 209
  • 1
  • 11
2
votes
2 answers

Bazel building C++ sample with ccache fails

I've been following the instructions for OSX here. I've installed bazel, cloned the sample and tried to build it with bazel build //main:hello-world. But here where it got wrong. INFO: Analysed target //main:hello-world (0 packages loaded).…
Teivaz
  • 5,462
  • 4
  • 37
  • 75
2
votes
2 answers

Ccache not growing over 1GB with max size = 30GB when compiling AOSP 8.1

I'm compiling AOSP 8.1.0 source tree on my build server. I made a docker image with all packages needed from Ubuntu 16.04. I mount the source tree, ANDROID_OUT and ccache dir when starting docker image. The path in docker for these three directories…
Slaviro
  • 128
  • 1
  • 8
2
votes
0 answers

Command rm not working on Mac OS I get permission denied

I am using ccache and it is stuck in a state that blocks all builds that use it. I tried doing ccache --clear but the command simply hangs, so I went ahead and decided to delete the .ccache folder manually but I am getting permission denied. stat…
Makaronodentro
  • 907
  • 1
  • 7
  • 21
2
votes
1 answer

have ccache link against the same file in different directories

I'm using ccache with git-worktree. So many of the same files are shared across multiple directories. Problem is that ccache doesn't check if the file is the same, and is compiled again. Is there a ccache option that would allow it to check the…
Trevor Norris
  • 20,499
  • 4
  • 26
  • 28
2
votes
2 answers

How can I use ccache with gcc -march=native across multiple architectures?

The -march=native option to gcc generates different code depending on the architecture of the host. ccache does not store the machine architecture in its hash which means that if you change the architecture of the machine, for example to switch to a…
Brice M. Dempsey
  • 1,985
  • 20
  • 16
2
votes
1 answer

How to set C++ breakpoint in eclipse when source is compiled with ccache?

Recently, our development team is starting to use ccache to do faster compile (the compile is done from sandbox /usr/x). Now, when I compile from my sandbox (/usr/y), and try to set a breakpoint in the code in Eclipse (GDB (DSF) process launcher),…
David Ng
  • 31
  • 4
2
votes
1 answer

Can I get npm / gyp to use ccache?

ccache is a fantastic way to speed up building C binaries which you have already built previously, by caching the results. (Another great tool is distcc, which will pass code to other machines for parallel compilation!) Can I get npm to use ccache…
joeytwiddle
  • 29,306
  • 13
  • 121
  • 110