From 5035f4ef68922ac758b1e4734e67d73c9228010b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Aug 2019 14:38:57 +0200 Subject: 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. --- build2/cxx/init.cxx | 7 ++++--- build2/cxx/target.cxx | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) (limited to 'build2/cxx') diff --git a/build2/cxx/init.cxx b/build2/cxx/init.cxx index c355763..1ffa098 100644 --- a/build2/cxx/init.cxx +++ b/build2/cxx/init.cxx @@ -62,7 +62,8 @@ namespace build2 // auto enter = [&rs] (const char* v) -> const variable& { - return var_pool.rw (rs).insert (v, variable_visibility::project); + return rs.ctx.var_pool.rw (rs).insert ( + v, variable_visibility::project); }; // NOTE: see also module sidebuild subproject if changing anything about @@ -370,7 +371,7 @@ namespace build2 // Enter all the variables and initialize the module data. // - auto& v (var_pool.rw (rs)); + auto& v (rs.ctx.var_pool.rw (rs)); cc::config_data d { cc::lang::cxx, @@ -572,7 +573,7 @@ namespace build2 config_module& cm (*rs.lookup_module ("cxx.guess")); - auto& vp (var_pool.rw (rs)); + auto& vp (rs.ctx.var_pool.rw (rs)); bool modules (cast (rs["cxx.features.modules"])); diff --git a/build2/cxx/target.cxx b/build2/cxx/target.cxx index 025bf9d..45463f3 100644 --- a/build2/cxx/target.cxx +++ b/build2/cxx/target.cxx @@ -19,8 +19,8 @@ namespace build2 &cc::static_type, &target_factory, nullptr, /* fixed_extension */ - &target_extension_var, - &target_pattern_var, + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false @@ -33,8 +33,8 @@ namespace build2 &cc::static_type, &target_factory, nullptr, /* fixed_extension */ - &target_extension_var, - &target_pattern_var, + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false @@ -47,8 +47,8 @@ namespace build2 &cc::static_type, &target_factory, nullptr, /* fixed_extension */ - &target_extension_var, - &target_pattern_var, + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false @@ -61,8 +61,8 @@ namespace build2 &cc::static_type, &target_factory, nullptr, /* fixed_extension */ - &target_extension_var, - &target_pattern_var, + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false @@ -75,8 +75,8 @@ namespace build2 &cc::static_type, &target_factory, nullptr, /* fixed_extension */ - &target_extension_var, - &target_pattern_var, + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false -- cgit v1.1