aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}