aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/compile-rule.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index 7ccaeb4..f0854a7 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -4624,16 +4624,13 @@ namespace build2
diag_record dr;
if (bad_error)
- dr << error << "expected error exit status from "
+ dr << fail << "expected error exit status from "
<< x_lang << " compiler";
if (dbuf.is_open ())
- dbuf.close (move (dr));
+ dbuf.close (move (dr)); // Throws if error.
}
- if (bad_error)
- throw failed ();
-
// Ignore expected successes (we are done).
//
if (!restart && psrc)
@@ -4731,10 +4728,9 @@ namespace build2
// example, because we have removed all the partially
// preprocessed source files).
//
- bool f (force_gen_skip && *force_gen_skip == skip_count);
{
diag_record dr;
- if (f)
+ if (force_gen_skip && *force_gen_skip == skip_count)
{
dr <<
fail << "inconsistent " << x_lang << " compiler behavior" <<
@@ -4749,12 +4745,9 @@ namespace build2
}
if (dbuf.is_open ())
- dbuf.close (move (dr));
+ dbuf.close (move (dr)); // Throws if error.
}
- if (f)
- throw failed ();
-
restart = true;
force_gen = true;
force_gen_skip = skip_count;