From 2c1f0e64d1700ae025329707e39eb8a260741aa6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 2 Jun 2023 09:46:41 +0200 Subject: Fix another race in library metadata protocol logic --- libbuild2/cc/compile-rule.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libbuild2/cc/compile-rule.cxx') diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index ca6da03..36276f9 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -1007,6 +1007,12 @@ namespace build2 // to match it if we may need its modules or importable headers // (see search_modules(), make_header_sidebuild() for details). // + // Well, that was the case until we've added support for immediate + // importation of libraries, which happens during the load phase + // and natually leaves the library unmatched. While we could have + // returned from search_library() an indication of whether the + // library has been matched, this doesn't seem worth the trouble. + // if (p.proj ()) { pt = search_library (a, @@ -1014,8 +1020,10 @@ namespace build2 usr_lib_dirs, p.prerequisite); +#if 0 if (pt != nullptr && !modules) continue; +#endif } if (pt == nullptr) -- cgit v1.1