<<_using_ccache_with_other_compiler_wrappers,USING CCACHE WITH OTHER
COMPILER WRAPPERS>>.
+*prefix_command_cpp* (*CCACHE_PREFIX_CPP*)::
+
+ This option adds a list of prefixes (separated by space) to the command
+ line that ccache uses when invoking the preprocessor.
+
*read_only* (*CCACHE_READONLY*) [boolean]::
If true, ccache will attempt to use existing cached object files, but it
Another minor thing is that if *prefix_command* is used, ccache will not invoke
the other wrapper when running the preprocessor, which increase performance.
+You can use the *prefix_command_cpp* configuration setting, if you also want to
+invoke the other wrapper when doing preprocessing (normally by adding *-E*).
Bugs
static const char HASH_PREFIX[] = "3";
static void
-add_prefix(struct args *args)
+add_prefix(struct args *args, char *prefix_command)
{
char *e;
char *tok, *saveptr = NULL;
struct args *prefix;
int i;
- if (str_eq(conf->prefix_command, "")) {
+ if (str_eq(prefix_command, "")) {
return;
}
prefix = args_init(0, NULL);
- e = x_strdup(conf->prefix_command);
+ e = x_strdup(prefix_command);
for (tok = strtok_r(e, " ", &saveptr);
tok;
tok = strtok_r(NULL, " ", &saveptr)) {
}
free(e);
- cc_log("Using command-line prefix %s", conf->prefix_command);
+ cc_log("Using command-line prefix %s", prefix_command);
for (i = prefix->argc; i != 0; i--) {
args_add_prefix(args, prefix->argv[i-1]);
}
assert(orig_args);
args_strip(orig_args, "--ccache-");
- add_prefix(orig_args);
+ add_prefix(orig_args, conf->prefix_command);
cc_log("Failed; falling back to running the real compiler");
cc_log_argv("Executing ", orig_args->argv);
args_add(args, "-E");
args_add(args, input_file);
+ add_prefix(args, conf->prefix_command_cpp);
cc_log("Running preprocessor");
status = execute(args->argv, path_stdout_fd, path_stderr_fd, &compiler_pid);
args_pop(args, 2);
failed();
}
- add_prefix(compiler_args);
+ add_prefix(compiler_args, conf->prefix_command);
/* run real compiler, sending output to cache */
to_cache(compiler_args);
conf->max_size = (uint64_t)5 * 1000 * 1000 * 1000;
conf->path = x_strdup("");
conf->prefix_command = x_strdup("");
+ conf->prefix_command_cpp = x_strdup("");
conf->read_only = false;
conf->read_only_direct = false;
conf->recache = false;
free(conf->log_file);
free(conf->path);
free(conf->prefix_command);
+ free(conf->prefix_command_cpp);
free(conf->temporary_dir);
free(conf->item_origins);
free(conf);
reformat(&s, "prefix_command = %s", conf->prefix_command);
printer(s, conf->item_origins[find_conf("prefix_command")->number], context);
+ reformat(&s, "prefix_command_cpp = %s", conf->prefix_command_cpp);
+ printer(s, conf->item_origins[find_conf(
+ "prefix_command_cpp")->number], context);
+
reformat(&s, "read_only = %s", bool_to_string(conf->read_only));
printer(s, conf->item_origins[find_conf("read_only")->number], context);
uint64_t max_size;
char *path;
char *prefix_command;
+ char *prefix_command_cpp;
bool read_only;
bool read_only_direct;
bool recache;
max_size, 16, ITEM(max_size, size)
path, 17, ITEM(path, env_string)
prefix_command, 18, ITEM(prefix_command, env_string)
-read_only, 19, ITEM(read_only, bool)
-read_only_direct, 20, ITEM(read_only_direct, bool)
-recache, 21, ITEM(recache, bool)
-run_second_cpp, 22, ITEM(run_second_cpp, bool)
-sloppiness, 23, ITEM(sloppiness, sloppiness)
-stats, 24, ITEM(stats, bool)
-temporary_dir, 25, ITEM(temporary_dir, env_string)
-umask, 26, ITEM(umask, umask)
-unify, 27, ITEM(unify, bool)
+prefix_command_cpp, 19, ITEM(prefix_command_cpp, env_string)
+read_only, 20, ITEM(read_only, bool)
+read_only_direct, 21, ITEM(read_only_direct, bool)
+recache, 22, ITEM(recache, bool)
+run_second_cpp, 23, ITEM(run_second_cpp, bool)
+sloppiness, 24, ITEM(sloppiness, sloppiness)
+stats, 25, ITEM(stats, bool)
+temporary_dir, 26, ITEM(temporary_dir, env_string)
+umask, 27, ITEM(umask, umask)
+unify, 28, ITEM(unify, bool)
#line 8 "confitems.gperf"
struct conf_item;
-/* maximum key range = 45, duplicates = 0 */
+/* maximum key range = 41, duplicates = 0 */
#ifdef __GNUC__
__inline
{
static const unsigned char asso_values[] =
{
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 20, 5, 0,
- 10, 0, 50, 0, 15, 5, 50, 50, 20, 10,
- 0, 0, 10, 50, 0, 0, 0, 5, 50, 50,
- 30, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 0, 13, 0,
+ 15, 10, 45, 5, 30, 10, 45, 45, 10, 20,
+ 5, 0, 0, 45, 5, 0, 10, 15, 45, 45,
+ 15, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45
};
return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]];
}
{
enum
{
- TOTAL_KEYWORDS = 28,
+ TOTAL_KEYWORDS = 29,
MIN_WORD_LENGTH = 4,
MAX_WORD_LENGTH = 26,
- MIN_HASH_VALUE = 5,
- MAX_HASH_VALUE = 49
+ MIN_HASH_VALUE = 4,
+ MAX_HASH_VALUE = 44
};
static const struct conf_item wordlist[] =
{
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
+#line 27 "confitems.gperf"
+ {"path", 17, ITEM(path, env_string)},
+ {"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
{"",0,NULL,0,NULL},
-#line 34 "confitems.gperf"
- {"stats", 24, ITEM(stats, bool)},
- {"",0,NULL,0,NULL},
-#line 31 "confitems.gperf"
- {"recache", 21, ITEM(recache, bool)},
#line 13 "confitems.gperf"
{"compiler", 3, ITEM(compiler, string)},
-#line 29 "confitems.gperf"
- {"read_only", 19, ITEM(read_only, bool)},
-#line 37 "confitems.gperf"
- {"unify", 27, ITEM(unify, bool)},
+#line 11 "confitems.gperf"
+ {"cache_dir", 1, ITEM(cache_dir, env_string)},
+ {"",0,NULL,0,NULL},
#line 15 "confitems.gperf"
{"compression", 5, ITEM(compression, bool)},
{"",0,NULL,0,NULL},
-#line 35 "confitems.gperf"
- {"temporary_dir", 25, ITEM(temporary_dir, env_string)},
+#line 17 "confitems.gperf"
+ {"cpp_extension", 7, ITEM(cpp_extension, string)},
#line 14 "confitems.gperf"
{"compiler_check", 4, ITEM(compiler_check, string)},
- {"",0,NULL,0,NULL},
-#line 30 "confitems.gperf"
- {"read_only_direct", 20, ITEM(read_only_direct, bool)},
+#line 35 "confitems.gperf"
+ {"stats", 25, ITEM(stats, bool)},
+#line 12 "confitems.gperf"
+ {"cache_dir_levels", 2, ITEM_V(cache_dir_levels, unsigned, dir_levels)},
#line 16 "confitems.gperf"
{"compression_level", 6, ITEM(compression_level, unsigned)},
- {"",0,NULL,0,NULL},
-#line 32 "confitems.gperf"
- {"run_second_cpp", 22, ITEM(run_second_cpp, bool)},
-#line 36 "confitems.gperf"
- {"umask", 26, ITEM(umask, umask)},
- {"",0,NULL,0,NULL},
-#line 19 "confitems.gperf"
- {"disable", 9, ITEM(disable, bool)},
-#line 17 "confitems.gperf"
- {"cpp_extension", 7, ITEM(cpp_extension, string)},
-#line 28 "confitems.gperf"
- {"prefix_command", 18, ITEM(prefix_command, env_string)},
- {"",0,NULL,0,NULL},
-#line 18 "confitems.gperf"
- {"direct_mode", 8, ITEM(direct_mode, bool)},
- {"",0,NULL,0,NULL},
#line 24 "confitems.gperf"
{"log_file", 14, ITEM(log_file, env_string)},
-#line 11 "confitems.gperf"
- {"cache_dir", 1, ITEM(cache_dir, env_string)},
-#line 33 "confitems.gperf"
- {"sloppiness", 23, ITEM(sloppiness, sloppiness)},
-#line 23 "confitems.gperf"
- {"ignore_headers_in_manifest", 13, ITEM(ignore_headers_in_manifest, env_string)},
- {"",0,NULL,0,NULL},
+#line 28 "confitems.gperf"
+ {"prefix_command", 18, ITEM(prefix_command, env_string)},
+#line 34 "confitems.gperf"
+ {"sloppiness", 24, ITEM(sloppiness, sloppiness)},
#line 10 "confitems.gperf"
{"base_dir", 0, ITEM_V(base_dir, env_string, absolute_path)},
-#line 27 "confitems.gperf"
- {"path", 17, ITEM(path, env_string)},
- {"",0,NULL,0,NULL},
-#line 12 "confitems.gperf"
- {"cache_dir_levels", 2, ITEM_V(cache_dir_levels, unsigned, dir_levels)},
- {"",0,NULL,0,NULL},
+#line 32 "confitems.gperf"
+ {"recache", 22, ITEM(recache, bool)},
+#line 29 "confitems.gperf"
+ {"prefix_command_cpp", 19, ITEM(prefix_command_cpp, env_string)},
+#line 30 "confitems.gperf"
+ {"read_only", 20, ITEM(read_only, bool)},
+#line 38 "confitems.gperf"
+ {"unify", 28, ITEM(unify, bool)},
+ {"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
#line 26 "confitems.gperf"
{"max_size", 16, ITEM(max_size, size)},
#line 25 "confitems.gperf"
{"max_files", 15, ITEM(max_files, unsigned)},
- {"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
+ {"",0,NULL,0,NULL},
+#line 31 "confitems.gperf"
+ {"read_only_direct", 21, ITEM(read_only_direct, bool)},
+#line 19 "confitems.gperf"
+ {"disable", 9, ITEM(disable, bool)},
+#line 36 "confitems.gperf"
+ {"temporary_dir", 26, ITEM(temporary_dir, env_string)},
+#line 33 "confitems.gperf"
+ {"run_second_cpp", 23, ITEM(run_second_cpp, bool)},
+ {"",0,NULL,0,NULL},
+#line 18 "confitems.gperf"
+ {"direct_mode", 8, ITEM(direct_mode, bool)},
{"",0,NULL,0,NULL},
#line 22 "confitems.gperf"
{"hash_dir", 12, ITEM(hash_dir, bool)},
#line 21 "confitems.gperf"
{"hard_link", 11, ITEM(hard_link, bool)},
- {"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
+#line 37 "confitems.gperf"
+ {"umask", 27, ITEM(umask, umask)},
+#line 23 "confitems.gperf"
+ {"ignore_headers_in_manifest", 13, ITEM(ignore_headers_in_manifest, env_string)},
{"",0,NULL,0,NULL}, {"",0,NULL,0,NULL},
#line 20 "confitems.gperf"
{"extra_files_to_hash", 10, ITEM(extra_files_to_hash, env_string)}
}
return 0;
}
-static const size_t CONFITEMS_TOTAL_KEYWORDS = 28;
+static const size_t CONFITEMS_TOTAL_KEYWORDS = 29;
NLEVELS, "cache_dir_levels"
PATH, "path"
PREFIX, "prefix_command"
+PREFIX_CPP, "prefix_command_cpp"
READONLY, "read_only"
READONLY_DIRECT, "read_only_direct"
RECACHE, "recache"
#line 9 "envtoconfitems.gperf"
struct env_to_conf_item;
-/* maximum key range = 41, duplicates = 0 */
+/* maximum key range = 42, duplicates = 0 */
#ifdef __GNUC__
__inline
{
static const unsigned char asso_values[] =
{
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 20, 0, 0, 10,
- 20, 43, 15, 25, 10, 43, 5, 10, 15, 0,
- 5, 10, 5, 0, 0, 0, 43, 43, 43, 43,
- 10, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 10, 0, 0, 10,
+ 20, 44, 5, 15, 0, 44, 30, 25, 15, 0,
+ 5, 15, 5, 15, 0, 0, 44, 44, 44, 44,
+ 0, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44
};
register int hval = len;
{
enum
{
- TOTAL_KEYWORDS = 28,
+ TOTAL_KEYWORDS = 29,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 15,
MIN_HASH_VALUE = 2,
- MAX_HASH_VALUE = 42
+ MAX_HASH_VALUE = 43
};
static const struct env_to_conf_item wordlist[] =
{"DIR", "cache_dir"},
#line 16 "envtoconfitems.gperf"
{"CPP2", "run_second_cpp"},
-#line 35 "envtoconfitems.gperf"
- {"STATS", "stats"},
+#line 39 "envtoconfitems.gperf"
+ {"UNIFY", "unify"},
#line 18 "envtoconfitems.gperf"
{"DIRECT", "direct_mode"},
#line 19 "envtoconfitems.gperf"
{"DISABLE", "disable"},
-#line 14 "envtoconfitems.gperf"
- {"COMPRESS", "compression"},
+ {"",""},
#line 29 "envtoconfitems.gperf"
{"PATH", "path"},
-#line 37 "envtoconfitems.gperf"
- {"UMASK", "umask"},
{"",""},
-#line 33 "envtoconfitems.gperf"
+#line 30 "envtoconfitems.gperf"
+ {"PREFIX", "prefix_command"},
+#line 34 "envtoconfitems.gperf"
{"RECACHE", "recache"},
-#line 15 "envtoconfitems.gperf"
- {"COMPRESSLEVEL", "compression_level"},
+#line 13 "envtoconfitems.gperf"
+ {"COMPILERCHECK", "compiler_check"},
{"",""},
-#line 38 "envtoconfitems.gperf"
- {"UNIFY", "unify"},
+#line 31 "envtoconfitems.gperf"
+ {"PREFIX_CPP", "prefix_command_cpp"},
{"",""},
-#line 36 "envtoconfitems.gperf"
+#line 37 "envtoconfitems.gperf"
{"TEMPDIR", "temporary_dir"},
-#line 31 "envtoconfitems.gperf"
+#line 32 "envtoconfitems.gperf"
{"READONLY", "read_only"},
#line 20 "envtoconfitems.gperf"
{"EXTENSION", "cpp_extension"},
-#line 34 "envtoconfitems.gperf"
- {"SLOPPINESS", "sloppiness"},
-#line 30 "envtoconfitems.gperf"
- {"PREFIX", "prefix_command"},
-#line 25 "envtoconfitems.gperf"
- {"LOGFILE", "log_file"},
-#line 13 "envtoconfitems.gperf"
- {"COMPILERCHECK", "compiler_check"},
+#line 36 "envtoconfitems.gperf"
+ {"STATS", "stats"},
{"",""},
-#line 32 "envtoconfitems.gperf"
+#line 23 "envtoconfitems.gperf"
+ {"HASHDIR", "hash_dir"},
+#line 14 "envtoconfitems.gperf"
+ {"COMPRESS", "compression"},
+ {"",""},
+#line 33 "envtoconfitems.gperf"
{"READONLY_DIRECT", "read_only_direct"},
{"",""},
+#line 11 "envtoconfitems.gperf"
+ {"BASEDIR", "base_dir"},
+#line 15 "envtoconfitems.gperf"
+ {"COMPRESSLEVEL", "compression_level"},
+ {"",""},
+#line 21 "envtoconfitems.gperf"
+ {"EXTRAFILES", "extra_files_to_hash"},
+ {"",""},
#line 27 "envtoconfitems.gperf"
{"MAXSIZE", "max_size"},
#line 26 "envtoconfitems.gperf"
{"MAXFILES", "max_files"},
- {"",""}, {"",""}, {"",""},
-#line 23 "envtoconfitems.gperf"
- {"HASHDIR", "hash_dir"},
+ {"",""},
+#line 38 "envtoconfitems.gperf"
+ {"UMASK", "umask"},
+ {"",""},
+#line 25 "envtoconfitems.gperf"
+ {"LOGFILE", "log_file"},
#line 22 "envtoconfitems.gperf"
{"HARDLINK", "hard_link"},
- {"",""}, {"",""}, {"",""},
-#line 11 "envtoconfitems.gperf"
- {"BASEDIR", "base_dir"},
-#line 24 "envtoconfitems.gperf"
- {"IGNOREHEADERS", "ignore_headers_in_manifest"},
{"",""},
-#line 21 "envtoconfitems.gperf"
- {"EXTRAFILES", "extra_files_to_hash"},
+#line 35 "envtoconfitems.gperf"
+ {"SLOPPINESS", "sloppiness"},
{"",""},
#line 28 "envtoconfitems.gperf"
- {"NLEVELS", "cache_dir_levels"}
+ {"NLEVELS", "cache_dir_levels"},
+#line 24 "envtoconfitems.gperf"
+ {"IGNOREHEADERS", "ignore_headers_in_manifest"}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
}
return 0;
}
-static const size_t ENVTOCONFITEMS_TOTAL_KEYWORDS = 28;
+static const size_t ENVTOCONFITEMS_TOTAL_KEYWORDS = 29;
unset CCACHE_NOSTATS
unset CCACHE_PATH
unset CCACHE_PREFIX
+unset CCACHE_PREFIX_CPP
unset CCACHE_READONLY
unset CCACHE_READONLY_DIRECT
unset CCACHE_RECACHE
checkstat 'cache miss' 1
checkfile prefix.result "a
b"
+
+ rm -f prefix.result
+ PATH=.:$PATH CCACHE_PREFIX_CPP="prefix-a prefix-b" $CCACHE $COMPILER -c file.c
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 2
+ checkstat 'cache miss' 1
+ checkfile prefix.result "a
+b"
}
######################################################################
#include "test/framework.h"
#include "test/util.h"
-#define N_CONFIG_ITEMS 28
+#define N_CONFIG_ITEMS 29
static struct {
char *descr;
const char *origin;
CHECK_INT_EQ((uint64_t)5 * 1000 * 1000 * 1000, conf->max_size);
CHECK_STR_EQ("", conf->path);
CHECK_STR_EQ("", conf->prefix_command);
+ CHECK_STR_EQ("", conf->prefix_command_cpp);
CHECK(!conf->read_only);
CHECK(!conf->read_only_direct);
CHECK(!conf->recache);
"max_size = 123M\n"
"path = $USER.x\n"
"prefix_command = x$USER\n"
+ "prefix_command_cpp = y\n"
"read_only = true\n"
"read_only_direct = true\n"
"recache = true\n"
CHECK_INT_EQ(123 * 1000 * 1000, conf->max_size);
CHECK_STR_EQ_FREE1(format("%s.x", user), conf->path);
CHECK_STR_EQ_FREE1(format("x%s", user), conf->prefix_command);
+ CHECK_STR_EQ("y", conf->prefix_command_cpp);
CHECK(conf->read_only);
CHECK(conf->read_only_direct);
CHECK(conf->recache);
98.7 * 1000 * 1000,
"p",
"pc",
+ "pcc",
true,
true,
true,
CHECK_STR_EQ("max_size = 98.7M", received_conf_items[n++].descr);
CHECK_STR_EQ("path = p", received_conf_items[n++].descr);
CHECK_STR_EQ("prefix_command = pc", received_conf_items[n++].descr);
+ CHECK_STR_EQ("prefix_command_cpp = pcc", received_conf_items[n++].descr);
CHECK_STR_EQ("read_only = true", received_conf_items[n++].descr);
CHECK_STR_EQ("read_only_direct = true", received_conf_items[n++].descr);
CHECK_STR_EQ("recache = true", received_conf_items[n++].descr);