Search code examples
ccachingccache

What does ccache mean by "called for link"


What is meant by the ccache statistic "called for link". I thought ccache only wrapped the compiler, not the linker?

[Brian@localhost ~]$ ccache -s
cache directory                     /home/Brian/.ccache
cache hit (direct)                 19813
cache hit (preprocessed)              67
cache miss                            11
called for link                      498
called for preprocessing              10
unsupported source language          472
no input file                         12
files in cache                    258568
cache size                          33.8 Gbytes
max cache size                     100.0 Gbytes

Solution

  • ccache indeed does not support linking.

    It does replace the C compiler (the C compiler driver, more specifically), however (look where and how it's installed and used). Because of that, it needs to "pass through" any commands it receives and does not handle/modify itself to the respective parts of the toolchain.