diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-24 14:47:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-24 14:47:22 +0200 |
commit | d0093238afad839adec76cb99ac0ef0657e7f87c (patch) | |
tree | 77ff14cccbd1f045ebc4b001392a10aa53fe790e /build2/cc/link.cxx | |
parent | fdd97d96801a0edbffae651fddc512a35a893234 (diff) |
Add change flag in addition to timestamp in Windows manifest logic
Essentially the same idea as with using target_state::changed in case
the timestamps are equal (due to insufficient resolution).
Diffstat (limited to 'build2/cc/link.cxx')
-rw-r--r-- | build2/cc/link.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx index bd2face..6d0c605 100644 --- a/build2/cc/link.cxx +++ b/build2/cc/link.cxx @@ -997,10 +997,12 @@ namespace build2 if (!for_install) rpath_timestamp = windows_rpath_timestamp (t, bs, act, lo); - path mf ( - windows_manifest ( - t, - rpath_timestamp != timestamp_nonexistent)); + pair<path, bool> p ( + windows_manifest (t, + rpath_timestamp != timestamp_nonexistent)); + + path& mf (p.first); + bool mf_cf (p.second); // Changed flag (timestamp resolution). timestamp mf_mt (file_mtime (mf)); @@ -1012,7 +1014,7 @@ namespace build2 // manifest = mf + ".o"; - if (mf_mt > file_mtime (manifest)) + if (mf_mt > file_mtime (manifest) || mf_cf) { path of (relative (manifest)); @@ -1087,7 +1089,7 @@ namespace build2 { manifest = move (mf); // Save for link.exe's /MANIFESTINPUT. - if (mf_mt > mt) + if (mf_mt > mt || mf_cf) update = true; // Manifest changed, force update. } } |