From 35e4dda6c64716bc04627d7544ccb3ee9a07616e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 16 Nov 2018 19:24:10 +0200 Subject: Test workaround theory for backwards mtime issue --- build2/cc/link-rule.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'build2') 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; -- cgit v1.1