aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/compile-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-06-02 09:46:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-06-02 09:46:41 +0200
commit2c1f0e64d1700ae025329707e39eb8a260741aa6 (patch)
tree31f2137e8c77ff9a670968e5835405f1cb34f32c /libbuild2/cc/compile-rule.cxx
parentb053edfa9bb29842d80931f02570f35f1896b75c (diff)
Fix another race in library metadata protocol logic
Diffstat (limited to 'libbuild2/cc/compile-rule.cxx')
-rw-r--r--libbuild2/cc/compile-rule.cxx8
1 files changed, 8 insertions, 0 deletions
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)