From 0a2fffabda163f9a7daa0351e53b4e7aa4f18dbd Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 16 Jul 2011 15:33:37 +0200 Subject: [PATCH] config: Use compiler_check from conf struct --- ccache.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ccache.c b/ccache.c index bfa6e1b26..108a3c77a 100644 --- a/ccache.c +++ b/ccache.c @@ -867,7 +867,6 @@ static void calculate_common_hash(struct args *args, struct mdfour *hash) { struct stat st; - const char *compilercheck; char *p; hash_string(hash, HASH_PREFIX); @@ -888,22 +887,19 @@ calculate_common_hash(struct args *args, struct mdfour *hash) /* * Hash information about the compiler. */ - compilercheck = getenv("CCACHE_COMPILERCHECK"); - if (!compilercheck) { - compilercheck = "mtime"; - } - if (str_eq(compilercheck, "none")) { + if (str_eq(conf->compiler_check, "none")) { /* Do nothing. */ - } else if (str_eq(compilercheck, "content")) { + } else if (str_eq(conf->compiler_check, "content")) { hash_delimiter(hash, "cc_content"); hash_file(hash, args->argv[0]); - } else if (str_eq(compilercheck, "mtime")) { + } else if (str_eq(conf->compiler_check, "mtime")) { hash_delimiter(hash, "cc_mtime"); hash_int(hash, st.st_size); hash_int(hash, st.st_mtime); } else { /* command string */ - if (!hash_multicommand_output(hash, compilercheck, orig_args->argv[0])) { - fatal("Failure running compiler check command: %s", compilercheck); + if (!hash_multicommand_output( + hash, conf->compiler_check, orig_args->argv[0])) { + fatal("Failure running compiler check command: %s", conf->compiler_check); } } -- 2.47.3