From 88f0780e34116c0441a8d8c58b8a8fd9fde4b1f5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 25 Jan 2017 15:41:44 +0200 Subject: Add model mutex, make var_pool const by default --- build2/c/init.cxx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'build2/c') 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 (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 ("c.loptions"), v.insert ("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 ("c.export.poptions"), v.insert ("c.export.coptions"), v.insert ("c.export.loptions"), v.insert> ("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 ("c.std", variable_visibility::project), @@ -224,7 +224,7 @@ namespace build2 // Load c.config. // if (!cast_false (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 ("c.config")); -- cgit v1.1