diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-19 11:26:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-19 11:26:50 +0200 |
commit | 3499ddd4ef5eeb7e274cbdf618cc53bf62939d14 (patch) | |
tree | b0b7b0e218596cb0e0b692babe59b56c3516ef65 | |
parent | a63bfa30007afb43e3b98c1975ea5648e487be9a (diff) |
Fix bug in header dependency extraction logic
-rw-r--r-- | build2/cc/compile.cxx | 18 |
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; } |