aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/compile.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-01-19 11:26:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-01-19 11:26:50 +0200
commit3499ddd4ef5eeb7e274cbdf618cc53bf62939d14 (patch)
treeb0b7b0e218596cb0e0b692babe59b56c3516ef65 /build2/cc/compile.cxx
parenta63bfa30007afb43e3b98c1975ea5648e487be9a (diff)
Fix bug in header dependency extraction logic
Diffstat (limited to 'build2/cc/compile.cxx')
-rw-r--r--build2/cc/compile.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx
index 3ae1e94..6bb3d9a 100644
--- a/build2/cc/compile.cxx
+++ b/build2/cc/compile.cxx
@@ -2377,7 +2377,7 @@ namespace build2
if (restart)
{
- l6 ([&]{trace << "restarting";});
+ l6 ([&]{trace << "restarting (cache)";});
break;
}
}
@@ -2546,6 +2546,17 @@ namespace build2
//
if (good_error)
restart = updating = true;
+ //
+ // And if we have updated the header (restart is true),
+ // then we may end up in this situation: an old header
+ // got included which caused the preprocessor to fail
+ // down the line. So if we are restarting, set the good
+ // error flag in case the process fails because of
+ // something like this (and if it is for a valid reason,
+ // then we will pick it up on the next round).
+ //
+ else if (restart)
+ good_error = true;
if (restart)
l6 ([&]{trace << "restarting";});
@@ -2611,6 +2622,11 @@ namespace build2
if (restart)
{
+ // The same "preprocessor may fail down the line"
+ // logic as above.
+ //
+ good_error = true;
+
l6 ([&]{trace << "restarting";});
break;
}