diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-12-03 14:33:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-12-03 14:33:25 +0200 |
commit | 864d84abcf1579b81f54d8d3f79520137d81f629 (patch) | |
tree | 574816959fec126b240075fdb304ad49e8142ab3 /libbuild2/cc/functions.cxx | |
parent | 08b69435ef6912abbca4b2830eac9e78776ef4d5 (diff) |
Add ability to get absolute library paths from ${c,cxx}.lib_libs()
Diffstat (limited to 'libbuild2/cc/functions.cxx')
-rw-r--r-- | libbuild2/cc/functions.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
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<names> ()) @@ -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<appended_libraries*> (ls), r, bs, - a, l, la, lf, li, self); + a, l, la, lf, li, self, rel); }}); // $<module>.lib_rpaths(<targets>, <otype> [, <link> [, <self>]]) |