From be1aefb4c5a9b4c41aa780edce52c6ac91ccdfe5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 8 Mar 2016 11:08:58 +0200 Subject: Fix depdb/target update race --- build2/cxx/compile.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'build2/cxx/compile.cxx') 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); -- cgit v1.1