From bc254a9a76db00e880ef526e55406f3291d92d52 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Jul 2020 11:22:00 +0200 Subject: Add additional diagnostics for disappearing header (GitHub issue #80) --- libbuild2/cc/compile-rule.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libbuild2/cc') diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index 8fe5e98..559db15 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -3863,7 +3863,23 @@ namespace build2 { // We can't be skipping over a non-existent header. // + // @@ TMP: but this does seem to happen in some rare, + // hard to reproduce situations. +#if 0 assert (!good_error); +#else + if (good_error) + { + info << "previously existing header '" << f << "'" + << " appears to have disappeared during build" << + info << "line: " << l << + info << "skip: " << skip << + info << "please report at " + << "https://github.com/build2/build2/issues/80"; + + assert (!good_error); + } +#endif skip--; } else -- cgit v1.1