diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-25 15:41:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-13 12:39:24 +0200 |
commit | 88f0780e34116c0441a8d8c58b8a8fd9fde4b1f5 (patch) | |
tree | 1240b36211772479dc1220712e0daed4e35ecd85 /build2/bin/init.cxx | |
parent | 61aa8e2b4bd7849838c04dc1f421c4760d88319f (diff) |
Add model mutex, make var_pool const by default
Diffstat (limited to 'build2/bin/init.cxx')
-rw-r--r-- | build2/bin/init.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/build2/bin/init.cxx b/build2/bin/init.cxx index 913c887..6bd2636 100644 --- a/build2/bin/init.cxx +++ b/build2/bin/init.cxx @@ -49,7 +49,7 @@ namespace build2 // if (first) { - auto& v (var_pool); + auto& v (var_pool.rw (r)); // Note: some overridable, some not. // @@ -325,7 +325,7 @@ namespace build2 // Load bin.config. // if (!cast_false<bool> (b["bin.config.loaded"])) - load_module ("bin.config", r, b, loc, false, hints); + load_module (r, b, "bin.config", loc, false, hints); // Cache some config values we will be needing below. // @@ -427,13 +427,13 @@ namespace build2 // Make sure bin.config is loaded. // if (!cast_false<bool> (b["bin.config.loaded"])) - load_module ("bin.config", r, b, loc, false, hints); + load_module (r, b, "bin.config", loc, false, hints); // Enter configuration variables. // if (first) { - auto& v (var_pool); + auto& v (var_pool.rw (r)); v.insert<process_path> ("bin.rc.path"); v.insert<process_path> ("bin.ranlib.path"); @@ -528,7 +528,7 @@ namespace build2 if (ranlib != nullptr) { r.assign<process_path> ("bin.ranlib.path") = move (ari.ranlib_path); - r.assign<string> ("bin.ranlib.id") = move (ari.ranlib_id); + r.assign<string> ("bin.ranlib.id") = move (ari.ranlib_id); r.assign<string> ("bin.ranlib.signature") = move (ari.ranlib_signature); r.assign<string> ("bin.ranlib.checksum") = @@ -554,10 +554,10 @@ namespace build2 // Make sure the bin core and ar.config are loaded. // if (!cast_false<bool> (b["bin.loaded"])) - load_module ("bin", r, b, loc, false, hints); + load_module (r, b, "bin", loc, false, hints); if (!cast_false<bool> (b["bin.ar.config.loaded"])) - load_module ("bin.ar.config", r, b, loc, false, hints); + load_module (r, b, "bin.ar.config", loc, false, hints); return true; } @@ -577,13 +577,13 @@ namespace build2 // Make sure bin.config is loaded. // if (!cast_false<bool> (b["bin.config.loaded"])) - load_module ("bin.config", r, b, loc, false, hints); + load_module (r, b, "bin.config", loc, false, hints); // Enter configuration variables. // if (first) { - auto& v (var_pool); + auto& v (var_pool.rw (r)); v.insert<process_path> ("bin.ld.path"); v.insert<path> ("config.bin.ld", true); @@ -652,10 +652,10 @@ namespace build2 // Make sure the bin core and ld.config are loaded. // if (!cast_false<bool> (b["bin.loaded"])) - load_module ("bin", r, b, loc, false, hints); + load_module (r, b, "bin", loc, false, hints); if (!cast_false<bool> (b["bin.ld.config.loaded"])) - load_module ("bin.ld.config", r, b, loc, false, hints); + load_module (r, b, "bin.ld.config", loc, false, hints); const string& lid (cast<string> (r["bin.ld.id"])); @@ -666,8 +666,8 @@ namespace build2 if (lid == "msvc") { const target_type& pdb (b.derive_target_type<file> ("pdb").first); - install_path (pdb, b, dir_path ("bin")); // Goes to install.bin - install_mode (pdb, b, "644"); // But not executable. + install_path (b, pdb, dir_path ("bin")); // Goes to install.bin + install_mode (b, pdb, "644"); // But not executable. } return true; @@ -688,13 +688,13 @@ namespace build2 // Make sure bin.config is loaded. // if (!cast_false<bool> (b["bin.config.loaded"])) - load_module ("bin.config", r, b, loc, false, hints); + load_module (r, b, "bin.config", loc, false, hints); // Enter configuration variables. // if (first) { - auto& v (var_pool); + auto& v (var_pool.rw (r)); v.insert<process_path> ("bin.rc.path"); v.insert<path> ("config.bin.rc", true); @@ -763,10 +763,10 @@ namespace build2 // Make sure the bin core and rc.config are loaded. // if (!cast_false<bool> (b["bin.loaded"])) - load_module ("bin", r, b, loc, false, hints); + load_module (r, b, "bin", loc, false, hints); if (!cast_false<bool> (b["bin.rc.config.loaded"])) - load_module ("bin.rc.config", r, b, loc, false, hints); + load_module (r, b, "bin.rc.config", loc, false, hints); return true; } |