If the temporary cpp_stderr file is missing when the compilation command
has finished then either some user removed it or ccache removed it in
clean_up_internal_tempdir (since the compilation took more than hour or
the system clock was adjusted?). In either case, let’s just fall back to
running the real compiler instead of failing fatally.
Fixes #480 and #154.
(cherry picked from commit
c74dbfe5d43fc23733bd44839b9bd119da94ba26)
hash_delimiter(hash, "cppstderr");
if (!direct_i_file && !hash_file(hash, path_stderr)) {
- fatal("Failed to open %s: %s", path_stderr, strerror(errno));
+ // Somebody removed the temporary file?
+ stats_update(STATS_ERROR);
+ cc_log("Failed to open %s: %s", path_stderr, strerror(errno));
+ failed();
}
if (direct_i_file) {