commit bd58b52d4ce42081056c08e46411ac3df2118d2b parent 5be4f0b476ad9297dc857497a4df41e1d2006bac Author: Quentin Rameau <quinq@fifth.space> Date: Mon, 4 Jul 2016 12:54:15 +0200 [driver] remove objfile only once per build failure Diffstat:
M | driver/posix/scc.c | | | 11 | +++++++---- |
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/driver/posix/scc.c b/driver/posix/scc.c @@ -296,9 +296,6 @@ validatetools(void) !WIFEXITED(st) || WEXITSTATUS(st) != 0) { failure = 1; failed = tool; - unlink(objfile); - free(objfile); - objfile = NULL; } if (tool >= failed && t->outfile) unlink(t->outfile); @@ -308,8 +305,14 @@ validatetools(void) t->pid = 0; } } + if (failed < LAST_TOOL) { + unlink(objfile); + free(objfile); + objfile = NULL; + return 0; + } - return failed == LAST_TOOL; + return 1; } static int