aboutsummaryrefslogtreecommitdiff
path: root/build2/c
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-25 15:41:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:39:24 +0200
commit88f0780e34116c0441a8d8c58b8a8fd9fde4b1f5 (patch)
tree1240b36211772479dc1220712e0daed4e35ecd85 /build2/c
parent61aa8e2b4bd7849838c04dc1f421c4760d88319f (diff)
Add model mutex, make var_pool const by default
Diffstat (limited to 'build2/c')
-rw-r--r--build2/c/init.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/build2/c/init.cxx b/build2/c/init.cxx
index f33ba9e..c5b8ac8 100644
--- a/build2/c/init.cxx
+++ b/build2/c/init.cxx
@@ -112,11 +112,11 @@ namespace build2
// Load cc.core.vars so that we can cache all the cc.* variables.
//
if (!cast_false<bool> (rs["cc.core.vars.loaded"]))
- load_module ("cc.core.vars", rs, rs, loc);
+ load_module (rs, rs, "cc.core.vars", loc);
// Enter all the variables and initialize the module data.
//
- auto& v (var_pool);
+ auto& v (var_pool.rw (rs));
cc::config_data d {
cc::lang::c,
@@ -142,23 +142,23 @@ namespace build2
v.insert<strings> ("c.loptions"),
v.insert<strings> ("c.libs"),
- v["cc.poptions"],
- v["cc.coptions"],
- v["cc.loptions"],
- v["cc.libs"],
+ v.insert ("cc.poptions"),
+ v.insert ("cc.coptions"),
+ v.insert ("cc.loptions"),
+ v.insert ("cc.libs"),
v.insert<strings> ("c.export.poptions"),
v.insert<strings> ("c.export.coptions"),
v.insert<strings> ("c.export.loptions"),
v.insert<vector<name>> ("c.export.libs"),
- v["cc.export.poptions"],
- v["cc.export.coptions"],
- v["cc.export.loptions"],
- v["cc.export.libs"],
+ v.insert ("cc.export.poptions"),
+ v.insert ("cc.export.coptions"),
+ v.insert ("cc.export.loptions"),
+ v.insert ("cc.export.libs"),
- v["cc.type"],
- v["cc.system"],
+ v.insert ("cc.type"),
+ v.insert ("cc.system"),
v.insert<string> ("c.std", variable_visibility::project),
@@ -224,7 +224,7 @@ namespace build2
// Load c.config.
//
if (!cast_false<bool> (rs["c.config.loaded"]))
- load_module ("c.config", rs, rs, loc, false, hints);
+ load_module (rs, rs, "c.config", loc, false, hints);
config_module& cm (*rs.modules.lookup<config_module> ("c.config"));