From d882a627e0c1c90f49a2a1f69273aafc5ebfb520 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Apr 2022 15:00:09 +0200 Subject: Fix bug in recursively-binless detection logic --- libbuild2/cc/link-rule.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index 4f31103..c186751 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -1327,7 +1327,11 @@ namespace build2 } else { - if (has_simple (find (x_libs)) || has_simple (find (c_libs))) + // These are strings and we assume if either is defined and + // not empty, then we have simple libraries. + // + if (((x = find (x_libs)) && !x->empty ()) || + ((c = find (c_libs)) && !c->empty ())) rec_binless = false; } } -- cgit v1.1