aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/link-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-10-18 11:30:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-10-18 11:30:15 +0200
commit6feaa13453d5071f340f405075c3ea880dc23ac1 (patch)
treeceb957c16237e28d0bba5c2f42a2efb272a2b3cc /build2/cc/link-rule.cxx
parent52019768ddc64f25416a692461a472bc2be2c7a7 (diff)
Fix bug in binless library linking logic
Diffstat (limited to 'build2/cc/link-rule.cxx')
-rw-r--r--build2/cc/link-rule.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx
index 93cdecf..1dd8726 100644
--- a/build2/cc/link-rule.cxx
+++ b/build2/cc/link-rule.cxx
@@ -1206,7 +1206,7 @@ namespace build2
if (!lu)
return;
- if (l->path ().empty ()) // Binless.
+ if (l->mtime () == timestamp_unreal) // Binless.
return;
for (const target* pt: l->prerequisite_targets[d.a])
@@ -1238,10 +1238,7 @@ namespace build2
// Linking a library to a shared library or executable.
//
- // Note: on Windows shared library could be the DLL with unknown
- // location (empty path). See search_library() for details.
- //
- if (l->path ().empty () && l->member == nullptr) // Binless.
+ if (l->mtime () == timestamp_unreal) // Binless.
return;
// On Windows a shared library is a DLL with the import library as
@@ -1352,10 +1349,7 @@ namespace build2
if (d.li.type == otype::a && !lu)
return;
- // Note: on Windows shared library could be the DLL with unknown
- // location (empty path). See search_library() for details.
- //
- if (l->path ().empty () && l->member == nullptr) // Binless.
+ if (l->mtime () == timestamp_unreal) // Binless.
return;
// Check if this library renders us out of date.
@@ -1459,7 +1453,7 @@ namespace build2
if (!l->is_a<libs> ())
return;
- if (l->path ().empty ()) // Binless.
+ if (l->mtime () == timestamp_unreal) // Binless.
return;
}
else
@@ -2250,7 +2244,7 @@ namespace build2
args[0] = ld->recall_string ();
- // The same logic as during hashing above.
+ // Append input files. The same logic as during hashing above.
//
// See also a similar loop inside append_libraries().
//