From 759e714238438cccf74f035e1ba11c925b27cd55 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 4 Jan 2018 16:04:39 +0200 Subject: Load config.build in init(), not boot() We now make sure the config module is init'ed first. --- build2/module.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'build2/module.cxx') diff --git a/build2/module.cxx b/build2/module.cxx index 7a35008..9994c9b 100644 --- a/build2/module.cxx +++ b/build2/module.cxx @@ -45,8 +45,9 @@ namespace build2 if (mf.boot == nullptr) fail (loc) << "module " << name << " shouldn't be loaded in bootstrap"; - i = lm.emplace (name, module_state {true, mf.init, nullptr, loc}).first; - mf.boot (rs, loc, i->second.module); + i = lm.emplace (name, + module_state {true, false, mf.init, nullptr, loc}).first; + i->second.first = mf.boot (rs, loc, i->second.module); } bool @@ -82,7 +83,8 @@ namespace build2 fail (loc) << "module " << name << " should be loaded in bootstrap"; i = lm.emplace ( - name, module_state {false, mf.init, nullptr, loc}).first; + name, + module_state {false, false, mf.init, nullptr, loc}).first; } } else -- cgit v1.1