diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-02-22 08:28:35 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-02-22 08:28:35 +0200 |
commit | 13840225f01b5000e726b27ad2cca1f4837e0a4d (patch) | |
tree | 0ac43a1496c2ecfb27912165d11dae293e58268c /libbuild2/cc/windows-rpath.cxx | |
parent | 73386de65fd49e7690da5203074a5ea603551db6 (diff) |
Deal with libs{} being member of group in windows_rpath_timestamp()
Fixes GH issue #366.
Diffstat (limited to 'libbuild2/cc/windows-rpath.cxx')
-rw-r--r-- | libbuild2/cc/windows-rpath.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libbuild2/cc/windows-rpath.cxx b/libbuild2/cc/windows-rpath.cxx index bd5a928..eb62ad1 100644 --- a/libbuild2/cc/windows-rpath.cxx +++ b/libbuild2/cc/windows-rpath.cxx @@ -45,6 +45,8 @@ namespace build2 // Return the greatest (newest) timestamp of all the DLLs that we will be // adding to the assembly or timestamp_nonexistent if there aren't any. // + // Note: called during the execute phase. + // timestamp link_rule:: windows_rpath_timestamp (const file& t, const scope& bs, @@ -88,7 +90,18 @@ namespace build2 // if (l->is_a<libs> () && !l->path ().empty ()) // Also covers binless. { - timestamp t (l->load_mtime ()); + // Handle the case where the library is a member of a group (for + // example, people are trying to hack something up with pre-built + // libraries; see GH issue #366). + // + timestamp t; + if (l->group_state (action () /* inner */)) + { + t = l->group->is_a<mtime_target> ()->mtime (); + assert (t != timestamp_unknown); + } + else + t = l->load_mtime (); if (t > r) r = t; |