diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-08 11:08:58 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-08 11:08:58 +0200 |
commit | be1aefb4c5a9b4c41aa780edce52c6ac91ccdfe5 (patch) | |
tree | 959c1ac962e7a73f18495fefea649cda097a11ec /build2/cxx/compile.cxx | |
parent | e2210969b337f3888ba9fb7617a009ca9bb2979a (diff) |
Fix depdb/target update race
Diffstat (limited to 'build2/cxx/compile.cxx')
-rw-r--r-- | build2/cxx/compile.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build2/cxx/compile.cxx b/build2/cxx/compile.cxx index 6382188..015d538 100644 --- a/build2/cxx/compile.cxx +++ b/build2/cxx/compile.cxx @@ -221,9 +221,10 @@ namespace build2 } // If any of the above checks resulted in a mismatch (different - // compiler, options, or source file), then force the target update. + // compiler, options, or source file), or if the database is newer + // than the target (interrupted update) then force the target update. // - if (dd.writing ()) + if (dd.writing () || dd.mtime () > t.mtime ()) t.mtime (timestamp_nonexistent); inject_prerequisites (a, t, st, mr.prerequisite->scope, dd); |