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/file.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'build2/file.cxx') diff --git a/build2/file.cxx b/build2/file.cxx index edd3e28..e18ae5e 100644 --- a/build2/file.cxx +++ b/build2/file.cxx @@ -879,14 +879,18 @@ namespace build2 // for (auto& p: root.modules) { - const string& n (p.first); module_state& s (p.second); - if (s.boot) - { - load_module (root, root, n, s.loc); - assert (!s.boot); - } + if (s.boot && s.first) + load_module (root, root, p.first, s.loc); + } + + for (auto& p: root.modules) + { + module_state& s (p.second); + + if (s.boot && !s.first) + load_module (root, root, p.first, s.loc); } // Load root.build. -- cgit v1.1