aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-16 19:24:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-16 19:24:10 +0200
commit35e4dda6c64716bc04627d7544ccb3ee9a07616e (patch)
treef71b6f64643b463370f29554e45be27a830cc32f
parent655121741560d62c1ae82c13a9d2aad18f130603 (diff)
Test workaround theory for backwards mtime issue
-rw-r--r--build2/cc/link-rule.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx
index 203c290..90d290d 100644
--- a/build2/cc/link-rule.cxx
+++ b/build2/cc/link-rule.cxx
@@ -2080,6 +2080,9 @@ namespace build2
if (!update)
return ts;
+ path ddp (tp + ".d");
+ timestamp dd_mt (file_mtime (ddp));
+
// Ok, so we are updating. Finish building the command line.
//
string in, out, out1, out2, out3; // Storage.
@@ -2543,16 +2546,12 @@ namespace build2
{
timestamp tp_tt (system_clock::now ());
-
- path dd (tp + ".d");
-
- timestamp dd_mt (file_mtime (dd));
timestamp tp_mt (file_mtime (tp));
if (dd_mt > tp_mt)
{
fail << "backwards modification times:\n"
- << dd.string () << " " << dd_mt << " (" << dd_rd << ")\n"
+ << ddp.string () << " " << dd_mt << " (" << dd_rd << ")\n"
<< tp.string () << " " << tp_mt << '\n'
<< dd_tt << '\n'
<< tp_tt;