From 096362fa82e7ab390078089e4dbbf04da66c79e0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Nov 2024 09:27:21 +0200 Subject: Handle config.import.*..{liba,libs} in cc::search_library() In particular, this provides support for using prefixed/suffixed installed libraries (GH issue #449). Note that the current implementation only supports immediate import but it feels like this limitation can be removed with some effort in the future. --- libbuild2/file.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libbuild2/file.cxx') diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx index f834d8c..8e3b2a4 100644 --- a/libbuild2/file.cxx +++ b/libbuild2/file.cxx @@ -2268,6 +2268,9 @@ namespace build2 // the config.. variable). For backwards-compatibility // reasons, it takes precedence over config.import. // + // Note also that phase 2 import may handle these imports in an ad hoc + // manner (see cc::search_library() for an example). + // // Note: see import phase 2 diagnostics if changing anything here. // // @@ How will this work for snake-case targets, say libs{build2-foo}? @@ -2364,10 +2367,10 @@ namespace build2 // // config.import.build2.b=b-boot // - // @@ Maybe we should still complete it if it's not simple? After - // all, this is a path, do we want interpretations other than - // relative to CWD? Maybe we do, who knows. Doesn't seem to - // harm anything at the moment. + // Maybe we should still complete it if it's not simple? After + // all, this is a path, do we want interpretations other than + // relative to CWD? Maybe we do, who knows. Doesn't seem to harm + // anything at the moment. Yes, we do, see cc::search_library(). // // Why not call import phase 2 directly here? Well, one good // reason would be to allow for rule-specific import resolution. -- cgit v1.1