aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-03-18 09:45:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-03-18 09:45:06 +0200
commitcbcae12587364f4cb7c44b50cc1ae4c8e1fb3bb3 (patch)
treeca0e750af125401e33b591e721ddcbd5ccbba0e0
parente33c0e75d468fcbd78197b27c2e9cc981045ddd9 (diff)
Move file_cache::write:close() call to correct place in cc::compile_rule
-rw-r--r--libbuild2/cc/compile-rule.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index e394175..9ae76a9 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -4625,7 +4625,12 @@ namespace build2
if (pr.wait ())
{
if (!bad_error) // Ignore expected successes (we are done).
+ {
+ if (!restart && psrc)
+ psrcw.close ();
+
continue;
+ }
fail << "expected error exit status from " << x_lang
<< " compiler";
@@ -4726,13 +4731,6 @@ namespace build2
}
else
run_finish (args, pr); // Throws.
-
- // Success.
- //
- assert (!restart);
-
- if (psrc)
- psrcw.close ();
}
catch (const process_error& e)
{