annotate lib/swig/swigwin-2.0.11/CCache/ccache-swig.1 @ 1899:b3009adc0e2f

Adding swig, gitignore, hgignore
author Nomad
date Mon, 21 Oct 2013 10:42:27 +0200
parents
children
rev   line source
1899
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1 .TH "ccache\-swig" "1" "" "" ""
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4 .SH "NAME"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 ccache\-swig \- a fast compiler cache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7 .SH "SYNOPSIS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10 ccache\-swig [OPTION]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 ccache\-swig <compiler> [COMPILER OPTIONS]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14 <compiler> [COMPILER OPTIONS]
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16 .SH "DESCRIPTION"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 ccache\-swig is a compiler cache\&. It speeds up re\-compilation of C/C++/SWIG code
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20 by caching previous compiles and detecting when the same compile is
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 being done again\&. ccache\-swig is ccache plus support for SWIG\&. ccache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 and ccache\-swig are used interchangeably in this document\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 .SH "OPTIONS SUMMARY"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 Here is a summary of the options to ccache\-swig\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 .nf
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 \-s show statistics summary
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 \-z zero statistics
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 \-c run a cache cleanup
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34 \-C clear the cache completely
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35 \-F <n> set maximum files in cache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36 \-M <n> set maximum size of cache (use G, M or K)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 \-h this help page
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38 \-V print version number
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40 .fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43 .SH "OPTIONS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 These options only apply when you invoke ccache as \(dq\&ccache\-swig\(dq\&\&. When
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47 invoked as a compiler none of these options apply\&. In that case your
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 normal compiler options apply and you should refer to your compilers
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49 documentation\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51 .IP "\fB\-h\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 Print a options summary page
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 .IP "\fB\-s\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55 Print the current statistics summary for the cache\&. The
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56 statistics are stored spread across the subdirectories of the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57 cache\&. Using \(dq\&ccache\-swig \-s\(dq\& adds up the statistics across all
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58 subdirectories and prints the totals\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 .IP "\fB\-z\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 Zero the cache statistics\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 .IP "\fB\-V\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 Print the ccache version number
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 .IP "\fB\-c\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67 Clean the cache and re\-calculate the cache file count and
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 size totals\&. Normally the \-c option should not be necessary as ccache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 keeps the cache below the specified limits at runtime and keeps
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 statistics up to date on each compile\&. This option is mostly useful
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 if you manually modify the cache contents or believe that the cache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 size statistics may be inaccurate\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74 .IP "\fB\-C\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75 Clear the entire cache, removing all cached files\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 .IP "\fB\-F <maxfiles>\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78 This sets the maximum number of files allowed in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 the cache\&. The value is stored inside the cache directory and applies
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80 to all future compiles\&. Due to the way the value is stored the actual
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 value used is always rounded down to the nearest multiple of 16\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 .IP "\fB\-M <maxsize>\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84 This sets the maximum cache size\&. You can specify
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85 a value in gigabytes, megabytes or kilobytes by appending a G, M or K
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86 to the value\&. The default is gigabytes\&. The actual value stored is
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87 rounded down to the nearest multiple of 16 kilobytes\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89 .SH "INSTALLATION"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
92 There are two ways to use ccache\&. You can either prefix your compile
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
93 commands with \(dq\&ccache\-swig\(dq\& or you can create a symbolic link between
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
94 ccache\-swig and the names of your compilers\&. The first method is most
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
95 convenient if you just want to try out ccache or wish to use it for
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
96 some specific projects\&. The second method is most useful for when you
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
97 wish to use ccache for all your compiles\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
98 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
99 To install for usage by the first method just copy ccache\-swig to somewhere
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
100 in your path\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
101 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
102 To install for the second method do something like this:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
103 .nf
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
104
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
105 cp ccache\-swig /usr/local/bin/
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
106 ln \-s /usr/local/bin/ccache\-swig /usr/local/bin/gcc
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
107 ln \-s /usr/local/bin/ccache\-swig /usr/local/bin/g++
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
108 ln \-s /usr/local/bin/ccache\-swig /usr/local/bin/cc
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
109 ln \-s /usr/local/bin/ccache\-swig /usr/local/bin/swig
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
110
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
111 .fi
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
112 This will work as long as /usr/local/bin comes before the path to gcc
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
113 (which is usually in /usr/bin)\&. After installing you may wish to run
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
114 \(dq\&which gcc\(dq\& to make sure that the correct link is being used\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
115 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
116 Note! Do not use a hard link, use a symbolic link\&. A hardlink will
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
117 cause \(dq\&interesting\(dq\& problems\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
118 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
119 .SH "EXTRA OPTIONS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
120
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
121 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
122 When run as a compiler front end ccache usually just takes the same
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
123 command line options as the compiler you are using\&. The only exception
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
124 to this is the option \(cq\&\-\-ccache\-skip\(cq\&\&. That option can be used to tell
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
125 ccache that the next option is definitely not a input filename, and
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
126 should be passed along to the compiler as\-is\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
127 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
128 The reason this can be important is that ccache does need to parse the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
129 command line and determine what is an input filename and what is a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
130 compiler option, as it needs the input filename to determine the name
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
131 of the resulting object file (among other things)\&. The heuristic
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
132 ccache uses in this parse is that any string on the command line that
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
133 exists as a file is treated as an input file name (usually a C
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
134 file)\&. By using \-\-ccache\-skip you can force an option to not be
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
135 treated as an input file name and instead be passed along to the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
136 compiler as a command line option\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
137 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
138 .SH "ENVIRONMENT VARIABLES"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
139
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
140 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
141 ccache uses a number of environment variables to control operation\&. In
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
142 most cases you won\(cq\&t need any of these as the defaults will be fine\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
143 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
144 .IP "\fBCCACHE_DIR\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
145 the CCACHE_DIR environment variable specifies
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
146 where ccache will keep its cached compiler output\&. The default is
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
147 \(dq\&$HOME/\&.ccache\(dq\&\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
148 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
149 .IP "\fBCCACHE_TEMPDIR\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
150 the CCACHE_TEMPDIR environment variable specifies
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
151 where ccache will put temporary files\&. The default is the same as
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
152 CCACHE_DIR\&. Note that the CCACHE_TEMPDIR path must be on the same
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
153 filesystem as the CCACHE_DIR path, so that renames of files between
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
154 the two directories can work\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
155 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
156 .IP "\fBCCACHE_LOGFILE\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
157 If you set the CCACHE_LOGFILE environment
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
158 variable then ccache will write some log information on cache hits
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
159 and misses in that file\&. This is useful for tracking down problems\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
160 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
161 .IP "\fBCCACHE_VERBOSE\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
162 If you set the CCACHE_VERBOSE environment
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
163 variable then ccache will display on stdout all the compiler invocations
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
164 that it makes\&. This can useful for debugging unexpected problems\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
165 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
166 .IP "\fBCCACHE_PATH\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
167 You can optionally set CCACHE_PATH to a colon
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
168 separated path where ccache will look for the real compilers\&. If you
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
169 don\(cq\&t do this then ccache will look for the first executable matching
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
170 the compiler name in the normal PATH that isn\(cq\&t a symbolic link to
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
171 ccache itself\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
172 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
173 .IP "\fBCCACHE_CC\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
174 You can optionally set CCACHE_CC to force the name
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
175 of the compiler to use\&. If you don\(cq\&t do this then ccache works it out
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
176 from the command line\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
177 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
178 .IP "\fBCCACHE_PREFIX\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
179 This option adds a prefix to the command line
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
180 that ccache runs when invoking the compiler\&. Also see the section
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
181 below on using ccache with distcc\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
182 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
183 .IP "\fBCCACHE_DISABLE\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
184 If you set the environment variable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
185 CCACHE_DISABLE then ccache will just call the real compiler,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
186 bypassing the cache completely\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
187 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
188 .IP "\fBCCACHE_READONLY\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
189 the CCACHE_READONLY environment variable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
190 tells ccache to attempt to use existing cached object files, but not
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
191 to try to add anything new to the cache\&. If you are using this because
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
192 your CCACHE_DIR is read\-only, then you may find that you also need to
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
193 set CCACHE_TEMPDIR as otherwise ccache will fail to create the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
194 temporary files\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
195 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
196 .IP "\fBCCACHE_CPP2\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
197 If you set the environment variable CCACHE_CPP2
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
198 then ccache will not use the optimisation of avoiding the 2nd call to
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
199 the pre\-processor by compiling the pre\-processed output that was used
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
200 for finding the hash in the case of a cache miss\&. This is primarily a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
201 debugging option, although it is possible that some unusual compilers
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
202 will have problems with the intermediate filename extensions used in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
203 this optimisation, in which case this option could allow ccache to be
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
204 used\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
205 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
206 .IP "\fBCCACHE_NOCOMPRESS\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
207 If you set the environment variable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
208 CCACHE_NOCOMPRESS then there is no compression used on files that go
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
209 into the cache\&. However, this setting has no effect on how files are
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
210 retrieved from the cache, compressed results will still be usable\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
211 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
212 .IP "\fBCCACHE_NOSTATS\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
213 If you set the environment variable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
214 CCACHE_NOSTATS then ccache will not update the statistics files on
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
215 each compile\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
216 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
217 .IP "\fBCCACHE_NLEVELS\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
218 The environment variable CCACHE_NLEVELS allows
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
219 you to choose the number of levels of hash in the cache directory\&. The
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
220 default is 2\&. The minimum is 1 and the maximum is 8\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
221 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
222 .IP "\fBCCACHE_HARDLINK\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
223 If you set the environment variable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
224 CCACHE_HARDLINK then ccache will attempt to use hard links from the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
225 cache directory when creating the compiler output rather than using a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
226 file copy\&. Using hard links is faster, but can confuse programs like
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
227 \(cq\&make\(cq\& that rely on modification times\&. Hard links are never made for
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
228 compressed cache files\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
229 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
230 .IP "\fBCCACHE_RECACHE\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
231 This forces ccache to not use any cached
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
232 results, even if it finds them\&. New results are still cached, but
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
233 existing cache entries are ignored\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
234 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
235 .IP "\fBCCACHE_UMASK\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
236 This sets the umask for ccache and all child
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
237 processes (such as the compiler)\&. This is mostly useful when you wish
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
238 to share your cache with other users\&. Note that this also affects the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
239 file permissions set on the object files created from your
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
240 compilations\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
241 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
242 .IP "\fBCCACHE_HASHDIR\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
243 This tells ccache to hash the current working
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
244 directory when calculating the hash that is used to distinguish two
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
245 compiles\&. This prevents a problem with the storage of the current
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
246 working directory in the debug info of a object file, which can lead
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
247 ccache to give a cached object file that has the working directory in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
248 the debug info set incorrectly\&. This option is off by default as the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
249 incorrect setting of this debug info rarely causes problems\&. If you
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
250 strike problems with gdb not using the correct directory then enable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
251 this option\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
252 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
253 .IP "\fBCCACHE_UNIFY\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
254 If you set the environment variable CCACHE_UNIFY
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
255 then ccache will use the C/C++ unifier when hashing the pre\-processor
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
256 output if \-g is not used in the compile\&. The unifier is slower than a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
257 normal hash, so setting this environment variable loses a little bit
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
258 of speed, but it means that ccache can take advantage of not
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
259 recompiling when the changes to the source code consist of
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
260 reformatting only\&. Note that using CCACHE_UNIFY changes the hash, so
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
261 cached compiles with CCACHE_UNIFY set cannot be used when
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
262 CCACHE_UNIFY is not set and vice versa\&. The reason the unifier is off
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
263 by default is that it can give incorrect line number information in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
264 compiler warning messages\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
265 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
266 .IP "\fBCCACHE_EXTENSION\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
267 Normally ccache tries to automatically
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
268 determine the extension to use for intermediate C pre\-processor files
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
269 based on the type of file being compiled\&. Unfortunately this sometimes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
270 doesn\(cq\&t work, for example when using the aCC compiler on HP\-UX\&. On
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
271 systems like this you can use the CCACHE_EXTENSION option to override
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
272 the default\&. On HP\-UX set this environment variable to \(dq\&i\(dq\& if you use
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
273 the aCC compiler\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
274 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
275 .IP "\fBCCACHE_STRIPC\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
276 If you set the environment variable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
277 CCACHE_STRIPC then ccache will strip the \-c option when invoking
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
278 the preprocessor\&. This option is primarily for the Sun Workshop
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
279 C++ compiler as without this option an unwarranted warning is displayed:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
280 CC: Warning: \(dq\&\-E\(dq\& redefines product from \(dq\&object\(dq\& to \(dq\&source (stdout)\(dq\&
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
281 when \-E and \-c is used together\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
282 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
283 .IP "\fBCCACHE_SWIG\fP"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
284 When using SWIG as the compiler and it does not
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
285 have \(cq\&swig\(cq\& in the executable name, then the CCACHE_SWIG environment
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
286 variable needs to be set in order for ccache to work correctly with
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
287 SWIG\&. The use of CCACHE_CPP2 is also recommended for SWIG due to some
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
288 preprocessor quirks, however, use of CCACHE_CPP2 can often be skipped
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
289 \-\- check your generated code with and without this option set\&. Known
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
290 problems are using preprocessor directives within %inline blocks and
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
291 the use of \(cq\&#pragma SWIG\(cq\&\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
292 .IP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
293 .SH "CACHE SIZE MANAGEMENT"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
294
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
295 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
296 By default ccache has a one gigabyte limit on the cache size and no
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
297 maximum number of files\&. You can set a different limit using the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
298 \(dq\&ccache \-M\(dq\& and \(dq\&ccache \-F\(dq\& options, which set the size and number of
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
299 files limits\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
300 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
301 When these limits are reached ccache will reduce the cache to 20%
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
302 below the numbers you specified in order to avoid doing the cache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
303 clean operation too often\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
304 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
305 .SH "CACHE COMPRESSION"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
306
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
307 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
308 By default on most platforms ccache will compress all files it puts
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
309 into the cache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
310 using the zlib compression\&. While this involves a negligible
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
311 performance slowdown, it significantly increases the number of files
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
312 that fit in the cache\&. You can turn off compression setting the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
313 CCACHE_NOCOMPRESS environment variable\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
314 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
315 .SH "HOW IT WORKS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
316
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
317 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
318 The basic idea is to detect when you are compiling exactly the same
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
319 code a 2nd time and use the previously compiled output\&. You detect
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
320 that it is the same code by forming a hash of:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
321 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
322 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
323 the pre\-processor output from running the compiler with \-E
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
324 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
325 the command line options
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
326 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
327 the real compilers size and modification time
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
328 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
329 any stderr output generated by the compiler
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
330
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
331 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
332 These are hashed using md4 (a strong hash) and a cache file is formed
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
333 based on that hash result\&. When the same compilation is done a second
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
334 time ccache is able to supply the correct compiler output (including
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
335 all warnings etc) from the cache\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
336 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
337 ccache has been carefully written to always produce exactly the same
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
338 compiler output that you would get without the cache\&. If you ever
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
339 discover a case where ccache changes the output of your compiler then
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
340 please let me know\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
341 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
342 .SH "USING CCACHE WITH DISTCC"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
343
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
344 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
345 distcc is a very useful program for distributing compilation across a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
346 range of compiler servers\&. It is often useful to combine distcc with
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
347 ccache, so that compiles that are done are sped up by distcc, but that
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
348 ccache avoids the compile completely where possible\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
349 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
350 To use distcc with ccache I recommend using the CCACHE_PREFIX
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
351 option\&. You just need to set the environment variable CCACHE_PREFIX to
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
352 \(cq\&distcc\(cq\& and ccache will prefix the command line used with the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
353 compiler with the command \(cq\&distcc\(cq\&\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
354 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
355 .SH "SHARING A CACHE"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
356
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
357 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
358 A group of developers can increase the cache hit rate by sharing a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
359 cache directory\&. The hard links however cause unwanted side effects,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
360 as all links to a cached file share the file\(cq\&s modification timestamp\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
361 This results in false dependencies to be triggered by timestamp\-based
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
362 build systems whenever another user links to an existing
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
363 file\&. Typically, users will see that their libraries and binaries are
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
364 relinked without reason\&. To share a cache without side effects, the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
365 following conditions need to be met:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
366 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
367 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
368 Use the same \fBCCACHE_DIR\fP environment variable setting
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
369 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
370 Unset the \fBCCACHE_HARDLINK\fP environment variable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
371 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
372 Make sure everyone sets the CCACHE_UMASK environment variable
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
373 to 002, this ensures that cached files are accessible to everyone in
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
374 the group\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
375 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
376 Make sure that all users have write permission in the entire
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
377 cache directory (and that you trust all users of the shared cache)\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
378 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
379 Make sure that the setgid bit is set on all directories in the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
380 cache\&. This tells the filesystem to inherit group ownership for new
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
381 directories\&. The command \(dq\&chmod g+s `find $CCACHE_DIR \-type d`\(dq\& might
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
382 be useful for this\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
383 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
384 Set \fBCCACHE_NOCOMPRESS\fP for all users, if there are users with
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
385 versions of ccache that do not support compression\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
386
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
387 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
388 .SH "HISTORY"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
389
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
390 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
391 ccache was inspired by the compilercache shell script script written
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
392 by Erik Thiele and I would like to thank him for an excellent piece of
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
393 work\&. See
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
394 http://www\&.erikyyy\&.de/compilercache/
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
395 for the Erik\(cq\&s scripts\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
396 ccache\-swig is a port of the original ccache with support added for use
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
397 with SWIG\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
398 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
399 I wrote ccache because I wanted to get a bit more speed out of a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
400 compiler cache and I wanted to remove some of the limitations of the
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
401 shell\-script version\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
402 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
403 .SH "DIFFERENCES FROM COMPILERCACHE"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
404
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
405 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
406 The biggest differences between Erik\(cq\&s compilercache script and ccache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
407 are:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
408 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
409 ccache is written in C, which makes it a bit faster (calling out to
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
410 external programs is mostly what slowed down the scripts)\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
411 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
412 ccache can automatically find the real compiler
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
413 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
414 ccache keeps statistics on hits/misses
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
415 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
416 ccache can do automatic cache management
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
417 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
418 ccache can cache compiler output that includes warnings\&. In many
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
419 cases this gives ccache a much higher cache hit rate\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
420 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
421 ccache can handle a much wider ranger of compiler options
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
422 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
423 ccache avoids a double call to cpp on a cache miss
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
424
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
425 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
426 .SH "CREDITS"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
427
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
428 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
429 Thanks to the following people for their contributions to ccache
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
430 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
431 Erik Thiele for the original compilercache script
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
432 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
433 Luciano Rocha for the idea of compiling the pre\-processor output
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
434 to avoid a 2nd cpp pass
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
435 .IP o
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
436 Paul Russell for many suggestions and the debian packaging
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
437
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
438 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
439 .SH "AUTHOR"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
440
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
441 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
442 ccache was written by Andrew Tridgell
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
443 http://samba\&.org/~tridge/\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
444 ccache was adapted to create ccache\-swig for use with SWIG by William Fulton\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
445 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
446 If you wish to report a problem or make a suggestion then please email
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
447 the SWIG developers on the swig\-devel mailing list, see
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
448 http://www\&.swig\&.org/mail\&.html
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
449 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
450 ccache is released under the GNU General Public License version 2 or
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
451 later\&. Please see the file COPYING for license details\&.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
452 .PP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
453