aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-22 14:38:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-23 18:14:07 +0200
commit5035f4ef68922ac758b1e4734e67d73c9228010b (patch)
tree271fdd5b1d6e995a058d97aacb3ac90a538d9ff1 /libbuild2/config/init.cxx
parent8793941652d6aa1c3d02b2f87f691e6d06254b7d (diff)
Introduce notion of build context
All non-const global state is now in class context and we can now have multiple independent builds going on at the same time.
Diffstat (limited to 'libbuild2/config/init.cxx')
-rw-r--r--libbuild2/config/init.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/libbuild2/config/init.cxx b/libbuild2/config/init.cxx
index b790569..6998017 100644
--- a/libbuild2/config/init.cxx
+++ b/libbuild2/config/init.cxx
@@ -29,8 +29,8 @@ namespace build2
l5 ([&]{trace << "for " << rs;});
- const string& mname (current_mname);
- const string& oname (current_oname);
+ const string& mname (rs.ctx.current_mname);
+ const string& oname (rs.ctx.current_oname);
// Only create the module if we are configuring or creating. This is a
// bit tricky since the build2 core may not yet know if this is the
@@ -80,7 +80,7 @@ namespace build2
assert (config_hints.empty ()); // We don't known any hints.
- auto& vp (var_pool.rw (rs));
+ auto& vp (rs.ctx.var_pool.rw (rs));
// Load config.build if one exists (we don't need to worry about
// disfigure since we will never be init'ed).
@@ -103,7 +103,7 @@ namespace build2
{
// Assume missing version is 0.
//
- auto p (extract_variable (f, c_v));
+ auto p (extract_variable (rs.ctx, f, c_v));
uint64_t v (p.second ? cast<uint64_t> (p.first) : 0);
if (v != module::version)
@@ -126,7 +126,7 @@ namespace build2
// global scope similar to builtin rules.
//
{
- auto& r (rs.global ().rules);
+ auto& r (rs.global_scope ().rules);
r.insert<mtime_target> (
configure_id, 0, "config.file", file_rule::instance);
}