aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/link.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-01 08:43:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-01 08:43:21 +0200
commit6b3a79157197d025c33d2f7799ce831861b3a612 (patch)
tree4f4d31b2282097c1b4fdccac2f091786155bfef2 /build2/cxx/link.cxx
parentbd9b1fa4b6c20b7eedf7f96d9b9aae6ff5edfbfb (diff)
Fix relinking on install for VC
Diffstat (limited to 'build2/cxx/link.cxx')
-rw-r--r--build2/cxx/link.cxx13
1 files changed, 9 insertions, 4 deletions
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.