annotate lib/swig/swigwin-2.0.11/CCache/web/index.html @ 1933:5fcf6023f9c3

DamageMonsterFromParty some additional vars removed, changed the ordering part to something more readable
author Grumpy7
date Wed, 23 Oct 2013 21:13:28 -0700
parents b3009adc0e2f
children
rev   line source
1899
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2 <HTML>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 <HEAD>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4 <TITLE>ccache</TITLE>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 </HEAD>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6 <BODY BGCOLOR="#ffffff" TEXT="#000000" VLINK="#292555" LINK="#292555" ALINK="#cc0033">
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7 <h2>ccache</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 ccache is a compiler cache. It acts as a caching pre-processor to
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10 C/C++ compilers, using the -E compiler switch and a hash to detect
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11 when a compilation can be satisfied from cache. This often results in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 a 5 to 10 times speedup in common compilations.<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14 The idea came from Erik Thiele wrote the original <a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 href="http://compilercache.sourceforge.net/">compilercache</a> program
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16 as a bourne shell script. ccache is a re-implementation of Erik's idea
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17 in C with more features and better performance.<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 <h2>Latest release</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 The latest release is ccache 2.4.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 <ul>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 <li>Added CCACHE_READONLY option
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 <li>Added CCACHE_TEMPDIR option
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 <li>fixed handling of hard-linked compilers on AIX
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 <li>added O_BINARY support, to try and support win32 compiles
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 <li>show cache directory in stats output
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 <li>fixed handling of HOME environment variable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 </ul>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 See the <a href="ccache-man.html">manual page</a> for details
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 on the new options.<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35 You can get this release from the <a href="http://ccache.samba.org/ftp/ccache/">download directory</a>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 <p>NOTE! This release changes the hash input slighly, so you will
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38 probably find that you will not get any hits against your existing
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39 cache when you upgrade.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41 <h2>Why bother?</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43 Why bother with a compiler cache? If you ever run "make clean; make"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44 then you can probably benefit from ccache. It is very common for
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 developers to do a clean build of a project for a whole host of
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 reasons, and this throws away all the information from your previous
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47 compiles.<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49 By using ccache you can get exactly the same effect as "make clean;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50 make" but much faster. It also helps a lot when doing RPM builds,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51 as RPM can make doing incremental builds tricky.<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53 I put the effort into writing ccache for 2 reasons. The first is the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 Samba build farm
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55 (<a href="http://build.samba.org/">http://build.samba.org/</a>)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56 which constantly does clean builds of Samba on about 30 machines after each
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57 CVS commit. On some of those machines the build took over an hour. By
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58 using ccache we get the same effect as clean builds but about 6 times
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59 faster.<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 The second reason is the autobuild system I used to run for
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62 Quantum. That system builds our whole Linux based OS from scratch
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 after every CVS commit to catch compilation problems quickly. Using
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 ccache those builds are much faster.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 <h2>Is it safe?</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 Yes. The most important aspect of a compiler cache is to <b>always</b>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 produce exactly the same output that the real compiler would
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 produce. The includes providing exactly the same object files and
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 exactly the same compiler warnings that would be produced if you use
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 the real compiler. The only way you should be able to tell that you
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73 are using ccache is the speed.<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75 I have coded ccache very carefully to try to provide these guarantees.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 <h2>Features</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 <ul>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80 <li> keeps statistics on hits/misses
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 <li> automatic cache size management
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 <li> can cache compiles that generate warnings
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 <li> easy installation
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84 <li> very low overhead
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85 <li> uses hard links where possible to avoid copies
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86 </ul>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88 <h2>Documentation</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90 See the <a href="ccache-man.html">manual page</a>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
92
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
93 <h2>Performance</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
94
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
95 Here are some results for compiling Samba on my Linux laptop. I have
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
96 also included the results of using Erik's compilercache program
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
97 (version 1.0.10) for comparison.<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
98
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
99 <table border=1>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
100 <tr><th> </th> <th>&nbsp;&nbsp;&nbsp;&nbsp;ccache</th> <th>&nbsp;compilercache</th> </tr>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
101 <tr><td>normal </td> <td align=right>13m 4s </td><td align=right>13m 4s</td> </tr>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
102 <tr><td>uncached </td> <td align=right>13m 15s </td><td align=right>15m 41s</td> </tr>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
103 <tr><td>cached </td> <td align=right>2m 45s </td><td align=right>4m 26s</td> </tr>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
104 </table>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
105
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
106 <h2>How to use it</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
107
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
108 You can use ccache in two ways. The first is just to prefix your
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
109 compile commands with "ccache". For example, you could change the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
110 "CC=gcc" line in your Makefile to be "CC=ccache gcc".<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
111
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
112 Alternatively, you can create symbolic links from your compilers name
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
113 to ccache. This allows you to use ccache without any changes to your
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
114 build system.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
115
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
116 <h2>Download</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
117
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
118 You can download the latest release from the <a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
119 href="http://ccache.samba.org/ftp/ccache/">download directory</a>.<p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
120
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
121 For the bleeding edge, you can fetch ccache via CVS or
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
122 rsync. To fetch via cvs use the following command:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
123
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
124 <pre>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
125 cvs -d :pserver:cvs@pserver.samba.org:/cvsroot co ccache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
126 </pre>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
127
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
128 To fetch via rsync use this command:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
129
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
130 <pre>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
131 rsync -Pavz samba.org::ftp/unpacked/ccache .
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
132 </pre>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
133
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
134 <h2>Related projects</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
135
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
136 Here are some related programs you may find interesting
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
137
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
138 <ul>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
139 <li> <a href="http://distcc.samba.org/">distcc</a> - a distributed compilation system
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
140 <li> <a href="http://cachecc1.sourceforge.net/">cachecc1</a> - a gcc specific cache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
141 <li> <a href="http://sourceforge.net/projects/gocache/">gocache</a> - a cross platform compiler cache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
142 </ul>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
143 <p>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
144
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
145 <h2>Mailing list</h2>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
146
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
147 <p>A <a href="http://lists.samba.org/mailman/listinfo/ccache/">mailing
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
148 list</a> is available for discussion of ccache.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
149
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
150
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
151 <hr>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
152 <tiny>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
153 <a href="http://samba.org/~tridge/">Andrew Tridgell</a><br>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
154 <a href="mailto:bugs@ccache.samba.org">bugs@ccache.samba.org</a>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
155 </tiny>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
156
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
157 </BODY>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
158 </HTML>