aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/file.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-11-20 09:27:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-11-20 11:18:52 +0200
commit096362fa82e7ab390078089e4dbbf04da66c79e0 (patch)
treead0a5c2c43ef276eddafb6a4aae51ab2d7b59977 /libbuild2/file.cxx
parentaec6628e8c1f0ebdb87767cbf804b01504d82459 (diff)
Handle config.import.*.<name>.{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.
Diffstat (limited to 'libbuild2/file.cxx')
-rw-r--r--libbuild2/file.cxx11
1 files changed, 7 insertions, 4 deletions
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.<proj>.<name> 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.