From 6b3a79157197d025c33d2f7799ce831861b3a612 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 1 Aug 2016 08:43:21 +0200 Subject: Fix relinking on install for VC --- build2/cxx/link.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'build2/cxx/link.cxx') diff --git a/build2/cxx/link.cxx b/build2/cxx/link.cxx index 789ed0b..9ee84ce 100644 --- a/build2/cxx/link.cxx +++ b/build2/cxx/link.cxx @@ -1113,13 +1113,13 @@ namespace build2 if (a.outer_operation () != install_id) rpath_timestamp = windows_rpath_timestamp (t); - // Whether - // path mf ( windows_manifest ( t, rpath_timestamp != timestamp_nonexistent)); + timestamp mt (file_mtime (mf)); + if (tsys == "mingw32") { // Compile the manifest into the object file with windres. While we @@ -1128,7 +1128,7 @@ namespace build2 // manifest = mf + ".o"; - if (file_mtime (mf) > file_mtime (manifest)) + if (mt > file_mtime (manifest)) { path of (relative (manifest)); @@ -1194,11 +1194,16 @@ namespace build2 throw failed (); } - update = true; // Force update. + update = true; // Manifest changed, force update. } } else + { manifest = move (mf); // Save for link.exe's /MANIFESTINPUT. + + if (mt > t.mtime ()) + update = true; // Manifest changed, force update. + } } // Check/update the dependency database. -- cgit v1.1