summaryrefslogtreecommitdiffstats
path: root/index.html
blob: d823874ac6d12505ae5e8aabfa867cb35fc87faa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>ccache &mdash; Compiler cache</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="ccache.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div id="banner">
<a href=".">
<span style="font-size: 500%; text-shadow: 5px 5px 5px #aaa">ccache</span>
<span style="font-size: 150%">&mdash; a fast C/C++ compiler cache</span>
</a>
</div>
<div id="navigation">
<div class="group" style="margin-top: 0">About it:</div>
<ul>
<li class="current"><a href=".">Overview</a></li>
<li><a href="performance.html">Performance</a></li>
<li><a href="news.html">News</a></li>
<li><a href="credits.html">Credits</a></li>
<li><a href="license.html">License</a></li>
</ul>
<div class="group">Get it:</div>
<ul>
<li><a href="download.html">Download</a></li>
</ul>
<div class="group">Use it:</div>
<ul>
<li><a href="documentation.html">Documentation</a></li>
<li class="level1"><a href="http://lists.samba.org/mailman/listinfo/ccache/">Mailing list</a></li>
<li class="level2"><a href="http://www.mail-archive.com/ccache@lists.samba.org">&ndash; Archive</a></li>
</ul>
<div class="group">Improve it:</div>
<ul>
<li><a href="bugs.html">Bug report</a></li>
<li class="level2"><a href="https://github.com/ccache/ccache/issues">&ndash; View existing</a></li>
<li class="level1"><a href="https://lists.samba.org/mailman/listinfo/ccache/">Mailing list</a></li>
<li class="level2"><a href="http://www.mail-archive.com/ccache@lists.samba.org">&ndash; Archive</a></li>
<li><a href="repo.html">Source repository</a></li>
<li class="level2"><a href="https://github.com/ccache/ccache">&ndash; Browse</a></li>
</ul>
</div>
<div id="content">
<h1>Compiler cache</h1>
<p>ccache (or “Ccache”, not “CCache”) is a compiler cache.
It <a href="performance.html">speeds up recompilation</a> by caching previous
compilations and detecting when the same compilation is being done again.
Supported languages are C, C++, Objective-C and Objective-C++.</p>
<p>ccache is free software, released under
the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License
version 3</a> or later. See also the <a href="license.html">license
page</a>.</p>
<h2>Latest news</h2>
<ul class="news">
<li><i>2019-05-01:</i> <a href="news.html#2019-05-01"><b>Version 3.7.1 has been released</b></a></li>
<li><i>2019-04-23:</i> <a href="news.html#2019-04-23"><b>Version 3.7 has been released</b></a></li>
<li><i>2019-04-03:</i> <a href="news.html#2019-04-03"><b>Web site moved from ccache.samba.org to ccache.dev</b></a></li>
<li><i>2019-01-14:</i> <a href="news.html#2019-01-14"><b>Version 3.6 has been released</b></a></li>
<li><i>2019-01-02:</i> <a href="news.html#2019-01-02"><b>Version 3.5.1 has been released</b></a></li>
</ul>
<p class="news">
<a href="news.html">All news</a>
</p>
<h2>Features</h2>
<ul>
<li>Keeps statistics on hits/misses.</li>
<li>Automatic cache size management.</li>
<li>Can cache compilations that generate warnings.</li>
<li>Easy installation.</li>
<li>Low overhead.</li>
<li>Optionally uses hard links where possible to avoid copies.</li>
</ul>
<h2>Limitations</h2>
<ul>
<li>Only knows how to cache the compilation of a single
C/C++/Objective-C/Objective-C++ file. Other types of compilations (multi-file
compilation, linking, etc) will silently fall back to running the real
compiler.</li>
<li>Only works with <a href="http://gcc.gnu.org">GCC</a> and compilers that
behave similar enough.</li>
<li>Some compiler flags are not supported. If such a flag is detected, ccache
will silently fall back to running the real compiler.</li>
</ul>
<h2>Why bother?</h2>
<p>If you ever run <code>make clean; make</code>, you can probably benefit from
ccache. It is common for developers to do a clean build of a project for a
whole host of reasons, and this throws away all the information from your
previous compilations. By using ccache, recompilation goes much faster.</p>
<p>Another reason to use ccache is that the same cache is used for builds in
different directories. If you have several versions or branches of a software
stored in different directories, many of the object files in a build directory
can probably be taken from the cache even if they were compiled for another
version or branch.</p>
<p>A third scenario is using ccache to speed up clean builds performed by
servers or build farms that regularly check that the code is buildable.</p>
<p>You can also share the cache between users, which can be very useful on
shared compilation servers.</p>
<h2>Is it safe?</h2>
<p>The most important aspect of a compiler cache is to always produce exactly
the same output that the real compiler would produce. This includes providing
exactly the same object files and exactly the same compiler warnings that would
be produced if you use the real compiler. The only way you should be able to
tell that you are using ccache is the speed.</p>
<p>ccache of course tries to provide these guarantees. However:</p>
<ul>
<li>
Compilers are moving targets. Newer compiler versions may, and often do,
introduce features that ccache can't foresee. In some cases it's also very
hard for ccache to handle the compiler behaviors in a good way, especially
in a way that is backward compatible with legacy compilers.
</li>
<li>
There are some known corner cases where ccache can fail to detect that
source code files have changed since a previous compilation. These
limitations are listed
under <a href="manual/latest.html#_caveats">caveats</a> in the manual.
</li>
</ul>
<p>If you experience any bugs or undocumented limitations, please
<a href="bugs.html">report them</a>.</p>
</div>
</body>
</html>