diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-24 05:44:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-24 05:44:37 +0200 |
commit | 7c57f2a85aa520db784a36ced65ec5c832dbfbc8 (patch) | |
tree | dd99be01f18303868d9c5158feb2230fdc7c12bb /libbuild2/cc/link-rule.cxx | |
parent | 52128dcc2d88a262238c07fe8acdbcfad684035c (diff) |
Add ability to get common interface options via $x.lib_poptions()
Specifically, the output target type may now be omitted for utility
libraries (libul{} and libu[eas]{}). In this case, only "common
interface" options will be returned for lib{} dependencies. This
is primarily useful for obtaining poptions to be passed to tools
other than C/C++ compilers (for example, Qt moc).
Diffstat (limited to 'libbuild2/cc/link-rule.cxx')
-rw-r--r-- | libbuild2/cc/link-rule.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index fff8716..0081fe2 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -1138,10 +1138,14 @@ namespace build2 m = 3; // Mark so it is not matched. // If this is the lib{}/libul{} group, then pick the appropriate - // member. + // member. Also note this in prerequisite_target::include (used + // by process_libraries()). // if (const libx* l = pt->is_a<libx> ()) + { pt = link_member (*l, a, li); + pto.include |= 4; + } } else { @@ -2360,7 +2364,9 @@ namespace build2 process_libraries (a, bs, li, sys_lib_dirs, l, la, - lf, imp, lib, opt, self, + lf, imp, lib, opt, + self, + false /* proc_opt_group */, lib_cache); } @@ -2574,7 +2580,10 @@ namespace build2 process_libraries (a, bs, li, sys_lib_dirs, l, la, 0 /* lflags */, - imp, lib, nullptr, false /* self */, lib_cache); + imp, lib, nullptr, + false /* self */, + false /* proc_opt_group */, + lib_cache); } void link_rule:: |