| ... | @@ -8732,12 +8732,14 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) { | ... | @@ -8732,12 +8732,14 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) { |
| 8732 | if ((err = cache_add_dep_file(cache_hash, out_dep_path, true))) { | 8732 | if ((err = cache_add_dep_file(cache_hash, out_dep_path, true))) { |
| 8733 | // Don't treat the absence of the .d file as a fatal error, the | 8733 | // Don't treat the absence of the .d file as a fatal error, the |
| 8734 | // compiler may not produce one eg. when compiling .s files | 8734 | // compiler may not produce one eg. when compiling .s files |
| 8735 | if (err != ErrorReadingDepFile) { | 8735 | if (err != ErrorFileNotFound) { |
| 8736 | fprintf(stderr, "Failed to add C source dependencies to cache: %s\n", err_str(err)); | 8736 | fprintf(stderr, "Failed to add C source dependencies to cache: %s\n", err_str(err)); |
| 8737 | exit(1); | 8737 | exit(1); |
| 8738 | } | 8738 | } |
| 8739 | } | 8739 | } |
| 8740 | os_delete_file(out_dep_path); | 8740 | if (err != ErrorFileNotFound) { |
| | 8741 | os_delete_file(out_dep_path); |
| | 8742 | } |
| 8741 | | 8743 | |
| 8742 | if ((err = cache_final(cache_hash, &digest))) { | 8744 | if ((err = cache_final(cache_hash, &digest))) { |
| 8743 | fprintf(stderr, "Unable to finalize cache hash: %s\n", err_str(err)); | 8745 | fprintf(stderr, "Unable to finalize cache hash: %s\n", err_str(err)); |