From 7380d3bef7fbfd6ed052c6ae8e253af039fadbe5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 25 Jul 2017 16:39:49 +0200 Subject: Remove incorrect assert in imported library processing logic --- build2/cc/common.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'build2/cc') 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 (l.vars[c_system]) - : sys (top_sysd, p.string ())); + : !p.empty () && sys (top_sysd, p.string ())); proc_lib (&l, p.string (), s); } -- cgit v1.1