diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-07 12:04:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-08 11:08:03 +0200 |
commit | 1703a30dec2695e7a5f1b81c633ac4c63479d9dd (patch) | |
tree | 48168a64b070f7e24384cce1ea2b4cc61d875602 /libbuild2/cc/compile-rule.cxx | |
parent | 5efc7faaea8fc780cf0fc9d0629fc50ea4fbd3b4 (diff) |
Allow passing fail diag record to diag_buffer::close()
Diffstat (limited to 'libbuild2/cc/compile-rule.cxx')
-rw-r--r-- | libbuild2/cc/compile-rule.cxx | 15 |
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; |