// Current working directory taken from $PWD, or getcwd() if $PWD is bad.
char *current_working_dir = NULL;
-// Print the unified preprocessed source code format, to stdout
-bool unify_print = false;
-
// The original argument list.
static struct args *orig_args;
}
if (conf->unify) {
- char *print = getenv("CCACHE_UNIFY_PRINT");
- unify_print = print != NULL ? true : false;
-
// When we are doing the unifying tricks we need to include the input file
// name in the hash to get the warnings right.
hash_delimiter(hash, "unifyfilename");
hash_string(hash, input_file);
hash_delimiter(hash, "unifycpp");
- if (unify_hash(hash, path_stdout, unify_print) != 0) {
+
+ bool debug_unify = getenv("CCACHE_DEBUG_UNIFY");
+ if (unify_hash(hash, path_stdout, debug_unify) != 0) {
stats_update(STATS_ERROR);
cc_log("Failed to unify %s", path_stdout);
failed();
// Copyright (C) 2002 Andrew Tridgell
-// Copyright (C) 2009-2016 Joel Rosdahl
+// Copyright (C) 2009-2017 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Hash a file that consists of preprocessor output, but remove any line number
// information from the hash.
int
-unify_hash(struct mdfour *hash, const char *fname, bool print)
+unify_hash(struct mdfour *hash, const char *fname, bool debug)
{
char *data;
size_t size;
stats_update(STATS_PREPROCESSOR);
return -1;
}
- print_unified = print;
+ print_unified = debug;
unify(hash, (unsigned char *)data, size);
free(data);
return 0;