From 864d84abcf1579b81f54d8d3f79520137d81f629 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 3 Dec 2020 14:33:25 +0200 Subject: Add ability to get absolute library paths from ${c,cxx}.lib_libs() --- libbuild2/cc/functions.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libbuild2/cc/functions.cxx') diff --git a/libbuild2/cc/functions.cxx b/libbuild2/cc/functions.cxx index 78ee212..98f7f97 100644 --- a/libbuild2/cc/functions.cxx +++ b/libbuild2/cc/functions.cxx @@ -175,7 +175,9 @@ namespace build2 // // The following flags are supported: // - // whole - link the specified libraries in the whole archive mode + // whole - link the specified libraries in the whole archive mode + // + // absolute - return absolute paths to the libraries // // If the last argument is false, then do not return the specified // libraries themselves. @@ -197,6 +199,7 @@ namespace build2 action a, const file& l, bool la, linfo li) { lflags lf (0); + bool rel (true); if (vs.size () > 2) { for (const name& f: vs[2].as ()) @@ -205,6 +208,8 @@ namespace build2 if (s == "whole") lf |= lflag_whole; + else if (s == "absolute") + rel = false; else fail << "invalid flag '" << s << "'"; } @@ -214,7 +219,7 @@ namespace build2 m.append_libraries (*static_cast (ls), r, bs, - a, l, la, lf, li, self); + a, l, la, lf, li, self, rel); }}); // $.lib_rpaths(, [, [, ]]) -- cgit v1.1