diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-08-25 08:13:27 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-08-25 08:16:23 +0200 |
commit | 5ce1f438decd05e01a16445da4703c2193447428 (patch) | |
tree | 9e527a029633e52d23b0a66bd8fdfacb71908585 | |
parent | 5c3af4220dfccfd4c381de575620a41966aa3e4f (diff) |
Keep mtime check always enabled on Windows
Windows is known not to guarantee monotonically increasing mtimes.
-rw-r--r-- | build2/b-options.cxx | 9 | ||||
-rw-r--r-- | build2/b.cli | 8 | ||||
-rw-r--r-- | libbuild2/config.hxx.in | 6 | ||||
-rw-r--r-- | libbuild2/depdb.hxx | 2 |
4 files changed, 16 insertions, 9 deletions
diff --git a/build2/b-options.cxx b/build2/b-options.cxx index 182dfb0..1c59231 100644 --- a/build2/b-options.cxx +++ b/build2/b-options.cxx @@ -1226,11 +1226,14 @@ namespace build2 os << std::endl << "\033[1m--mtime-check\033[0m Perform file modification time sanity checks. These" << ::std::endl << " checks can be helpful in diagnosing spurious rebuilds and" << ::std::endl - << " are enabled by default for the staged version of the" << ::std::endl - << " build system. Use \033[1m--no-mtime-check\033[0m to disable." << ::std::endl; + << " are enabled by default on Windows (which is known not to" << ::std::endl + << " guarantee monotonically increasing mtimes) and for the" << ::std::endl + << " staged version of the build system on other platforms." << ::std::endl + << " Use \033[1m--no-mtime-check\033[0m to disable." << ::std::endl; os << std::endl - << "\033[1m--no-mtime-check\033[0m Don't perform file modification time sanity checks." << ::std::endl; + << "\033[1m--no-mtime-check\033[0m Don't perform file modification time sanity checks. See" << ::std::endl + << " \033[1m--mtime-check\033[0m for details." << ::std::endl; os << std::endl << "\033[1m--no-column\033[0m Don't print column numbers in diagnostics." << ::std::endl; diff --git a/build2/b.cli b/build2/b.cli index 0ce0f9e..112db2b 100644 --- a/build2/b.cli +++ b/build2/b.cli @@ -580,13 +580,15 @@ namespace build2 { "Perform file modification time sanity checks. These checks can be helpful in diagnosing spurious rebuilds and are enabled by default - for the staged version of the build system. Use \cb{--no-mtime-check} - to disable." + on Windows (which is known not to guarantee monotonically increasing + mtimes) and for the staged version of the build system on other + platforms. Use \cb{--no-mtime-check} to disable." } bool --no-mtime-check { - "Don't perform file modification time sanity checks." + "Don't perform file modification time sanity checks. See + \cb{--mtime-check} for details." } bool --no-column diff --git a/libbuild2/config.hxx.in b/libbuild2/config.hxx.in index 59917db..9a2e01f 100644 --- a/libbuild2/config.hxx.in +++ b/libbuild2/config.hxx.in @@ -21,9 +21,11 @@ #define LIBBUILD2_STAGE true // Modification time sanity checks are by default only enabled for the staged -// version but this can be overridden at runtime with --[no-]mtime-check. +// version unless we are on Windows (which is known not to guarantee +// monotonically increasing mtimes). But this can be overridden at runtime +// with --[no-]mtime-check. // -#if LIBBUILD2_STAGE +#if LIBBUILD2_STAGE || defined(_WIN32) # define LIBBUILD2_MTIME_CHECK true #else # define LIBBUILD2_MTIME_CHECK false diff --git a/libbuild2/depdb.hxx b/libbuild2/depdb.hxx index abc2565..671c7fd 100644 --- a/libbuild2/depdb.hxx +++ b/libbuild2/depdb.hxx @@ -128,7 +128,7 @@ namespace build2 // Note that it would also be good to compare the target timestamp against // the newest prerequisite. However, obtaining this information would cost // extra (see execute_prerequisites()). So maybe later, if we get a case - // where this is a problem (in a sense, the database is a buffer between + // where this is a problem (in a sense, the database is a barrier between // prerequisites and the target). // void |