From cd10a583ad1f3c299383c07fd8c6ccd6e3199e6b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 11 Nov 2020 15:14:19 +0200 Subject: Add ${c,cxx}.lib_{poptions,libs,rpaths}() functions These functions can be used to query library metadata for options and libraries that should be used when compiling/linking dependent targets, similar to how cc::{compile,link}_rule do it. With this support it should be possible to more or less re-create their semantics in ad hoc recipes. --- libbuild2/functions-name.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libbuild2/functions-name.cxx') diff --git a/libbuild2/functions-name.cxx b/libbuild2/functions-name.cxx index 9b1a80b..8b61c81 100644 --- a/libbuild2/functions-name.cxx +++ b/libbuild2/functions-name.cxx @@ -32,7 +32,9 @@ namespace build2 return make_pair (move (n), move (e)); } - static const target& + // Note: this helper mey be used by other functions that operate on targets. + // + LIBBUILD2_SYMEXPORT const target& to_target (const scope& s, name&& n, name&& o) { if (const target* r = search_existing (n, s, o.dir)) -- cgit v1.1