From 30dcb00062969f914e1c6e02070287f499e02fbf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 29 Jul 2017 14:18:52 +0200 Subject: Fix bug in installed import library search on Windows --- build2/cc/common.cxx | 8 ++++++-- build2/cc/msvc.cxx | 5 +++-- build2/cc/windows-rpath.cxx | 6 ++++++ 3 files changed, 15 insertions(+), 4 deletions(-) (limited to 'build2') diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx index 195c3b7..ce8415c 100644 --- a/build2/cc/common.cxx +++ b/build2/cc/common.cxx @@ -224,6 +224,9 @@ namespace build2 { for (auto pt: l.prerequisite_targets) { + if (pt == nullptr) + continue; + bool a; const file* f; @@ -622,12 +625,13 @@ namespace build2 if (!exist) { if (l.owns_lock ()) + { s->member = i; + l.unlock (); + } else assert (s->member == i); - l.unlock (); - i->mtime (mt); i->path (move (f)); diff --git a/build2/cc/msvc.cxx b/build2/cc/msvc.cxx index 993065d..b7b5828 100644 --- a/build2/cc/msvc.cxx +++ b/build2/cc/msvc.cxx @@ -329,12 +329,13 @@ namespace build2 if (!exist) { if (l.owns_lock ()) + { s->member = i; + l.unlock (); + } else assert (s->member == i); - l.unlock (); - // Presumably there is a DLL somewhere, we just don't know where. // s->mtime (i->mtime ()); diff --git a/build2/cc/windows-rpath.cxx b/build2/cc/windows-rpath.cxx index 2f4f31f..6c8dd16 100644 --- a/build2/cc/windows-rpath.cxx +++ b/build2/cc/windows-rpath.cxx @@ -104,6 +104,9 @@ namespace build2 for (auto pt: t.prerequisite_targets) { + if (pt == nullptr) + continue; + const file* f; const liba* a; @@ -186,6 +189,9 @@ namespace build2 for (auto pt: t.prerequisite_targets) { + if (pt == nullptr) + continue; + const file* f; const liba* a; -- cgit v1.1