Created attachment 10861 [details] Missing copy of diagnostics file in case of compilation failure CAVEAT: The uploaded patch was created during the work to support -gsplit-dwarf (FissionDwarf) of GCC. (See bug 10005 ) Some of the patches have interdependence and if earlier patches are not applied, the later ones may fail. I will re-create patches appropriately depending on how an earlier patch is incorporated (or dropped). The whole list of broken patches below were uploaded in bug 10005 for convenience, but now separate bugzilla is filed to follow up on each of it (except for the main -gsplit-dwarf support, in bug 10005). 0001-Harden-logging-perror-replaced-with-cc_log-and-fatal.patch 0002-hash-file-creation-failure-is-recorded-now.patch 0003-Use-x_unlink-instead-of-unlink-per-HACKING.txt.patch 0004-make-sure-the-result-of-stat-call-is-checked.patch 0005-Enhance-log-message-add-prefix-var.-name-and-a-few-a.patch 0006-warning-about-missing-x_unlinks-when-get_file_from_c.patch 0007-Support-for-gsplit-dwarf.patch *0008-Missing-copy-of-diagnostics-file-in-case-of-failure.patch What this entry is about: Short explanation. 8: 0008-Missing-copy-of-diagnostics-file-in-case-of-failure.patch During the development of the support for -gsplit-dwarf, I noticed that when an error occurs, a premature exit path is taken, but maybe we might want to copy the temporary diagnostic (*_dia) file so that it is stored permanently somewhere. I tried to do something to this effect, but then the change of default behavior of ccache to produce output in the final destination first (and then copy them back to cache destination) may have unnecessitated this change. But I am not so sure. So to alert the developers (and myself) about this, I inserted a comment to this effect. If people are sure that this is no longer necessary, this patch can be dropped. This is actually not related to -gsplit-dwarf and so I am filing this separate bugzilla. TIA
No, there's no need (and not possible) to copy a .dia file from the cache when the compiler fails since (as you mention) ccache nowadays writes files to the final destination first.
(In reply to Joel Rosdahl from comment #1) Thank you for the confirmation of my suspicion. So this patch can go. TIA