diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-10 18:22:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-10 18:22:31 +0200 |
commit | 19af3f6b0873a92582e4787a87a6f14df53ff6ae (patch) | |
tree | 7545e80d9348eb7808e1c894cd111ab46cc8a9a5 /libbuild2/cc/common.cxx | |
parent | 9f95a23eae04680559a9cb943fdfaa00f52cd66e (diff) |
Preparatory work for public/private variable distinction
We still always use the public var_pool from context but where required,
all access now goes through scope::var_pool().
Diffstat (limited to 'libbuild2/cc/common.cxx')
-rw-r--r-- | libbuild2/cc/common.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libbuild2/cc/common.cxx b/libbuild2/cc/common.cxx index 4a0c4b1..2d344f1 100644 --- a/libbuild2/cc/common.cxx +++ b/libbuild2/cc/common.cxx @@ -164,6 +164,9 @@ namespace build2 if (self && proc_lib) chain->push_back (&l); + // We only lookup public variables so go straight for the public + // variable pool. + // auto& vp (top_bs.ctx.var_pool); do // Breakout loop. @@ -347,7 +350,7 @@ namespace build2 // Find system search directories corresponding to this library, i.e., // from its project and for its type (C, C++, etc). // - auto find_sysd = [&top_sysd, t, cc, same, &bs, &sysd, this] () + auto find_sysd = [&top_sysd, &vp, t, cc, same, &bs, &sysd, this] () { // Use the search dirs corresponding to this library scope/type. // @@ -356,7 +359,7 @@ namespace build2 : &cast<dir_paths> ( bs.root_scope ()->vars[same ? x_sys_lib_dirs - : bs.ctx.var_pool[t + ".sys_lib_dirs"]]); + : vp[t + ".sys_lib_dirs"]]); }; auto find_linfo = [top_li, t, cc, &bs, &l, &li] () |