aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-25 16:39:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-25 16:39:49 +0200
commit7380d3bef7fbfd6ed052c6ae8e253af039fadbe5 (patch)
tree7e53a0799bdeaeaa66bf3b445c4ab18efcbc7c9b
parentb1a29c378f517a37a7c74104690c81acafc72ca2 (diff)
Remove incorrect assert in imported library processing logic
-rw-r--r--build2/cc/common.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx
index b62358e..ec89e98 100644
--- a/build2/cc/common.cxx
+++ b/build2/cc/common.cxx
@@ -175,12 +175,15 @@ namespace build2
//
if (self && proc_lib)
{
+ // Note that while normally the path is assigned, in case of an import
+ // stub the path to the DLL may not be known and so the path will be
+ // empty (but proc_lib() will use the import stub).
+ //
const path& p (l.path ());
- assert (!p.empty ()); // Must be assigned.
bool s (t != nullptr // If cc library (matched or imported).
? cast_false<bool> (l.vars[c_system])
- : sys (top_sysd, p.string ()));
+ : !p.empty () && sys (top_sysd, p.string ()));
proc_lib (&l, p.string (), s);
}