free(path);
}
+static void
+print_included_files(FILE *fp)
+{
+ struct hashtable_itr *iter = hashtable_iterator(included_files);
+ do {
+ char *path = hashtable_iterator_key(iter);
+ fprintf(fp, "%s\n", path);
+ } while (hashtable_iterator_advance(iter));
+}
+
// Make a relative path from current working directory to path if path is under
// the base directory. Takes over ownership of path. Caller frees.
static char *
remember_include_file(path, hash, false, NULL);
}
+ bool debug_included = getenv("CCACHE_DEBUG_INCLUDED");
+ if (debug_included) {
+ print_included_files(stdout);
+ }
+
return true;
}
}
}
+ bool debug_included = getenv("CCACHE_DEBUG_INCLUDED");
+ if (debug_included) {
+ print_included_files(stdout);
+ }
+
struct file_hash *result = x_malloc(sizeof(*result));
hash_result_as_bytes(hash, result->hash);
result->size = hash->totalN;