| author | |
| committer | |
| log | 7330a6102f7a8108ee364b9de79efe4a70049167 |
| tree | 5b695c1cc8f10d1d153411d5ee6ff0ddf7e56dc2 |
| parent | f3db3b3c1319e2e86bf5eabd2c2eaef58e4dd783 |
| signature |
2 files changed, 9 insertions(+), 2 deletions(-)
src/cache_hash.cpp+5| ... | ... | @@ -470,6 +470,11 @@ Error cache_add_dep_file(CacheHash *ch, Buf *dep_file_path, bool verbose) { |
| 470 | 470 | Error err; |
| 471 | 471 | Buf *contents = buf_alloc(); |
| 472 | 472 | if ((err = os_fetch_file_path(dep_file_path, contents))) { |
| 473 | if (err == ErrorFileNotFound) | |
| 474 | return err; | |
| 475 | if (verbose) { | |
| 476 | fprintf(stderr, "unable to read .d file: %s\n", err_str(err)); | |
| 477 | } | |
| 473 | 478 | return ErrorReadingDepFile; |
| 474 | 479 | } |
| 475 | 480 | SplitIterator it = memSplit(buf_to_slice(contents), str("\r\n")); |
src/codegen.cpp+4-2| ... | ... | @@ -8732,12 +8732,14 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) { |
| 8732 | 8732 | if ((err = cache_add_dep_file(cache_hash, out_dep_path, true))) { |
| 8733 | 8733 | // Don't treat the absence of the .d file as a fatal error, the |
| 8734 | 8734 | // compiler may not produce one eg. when compiling .s files |
| 8735 | if (err != ErrorReadingDepFile) { | |
| 8735 | if (err != ErrorFileNotFound) { | |
| 8736 | 8736 | fprintf(stderr, "Failed to add C source dependencies to cache: %s\n", err_str(err)); |
| 8737 | 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 | 8744 | if ((err = cache_final(cache_hash, &digest))) { |
| 8743 | 8745 | fprintf(stderr, "Unable to finalize cache hash: %s\n", err_str(err)); |