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.hxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'build2/module.hxx') diff --git a/build2/module.hxx b/build2/module.hxx index e3ab94f..fbaebd7 100644 --- a/build2/module.hxx +++ b/build2/module.hxx @@ -25,8 +25,11 @@ namespace build2 ~module_base () = default; }; + // Return true if the module should be initialized first (the order of + // initialization within each group is unspecified). + // using module_boot_function = - void (scope& root, + bool (scope& root, const location&, unique_ptr&); @@ -62,7 +65,8 @@ namespace build2 // struct module_state { - bool boot; // True if the module boot'ed but not yet init'ed. + bool boot; // True if the module boot'ed but not yet init'ed. + bool first; // True if the boot'ed module must be init'ed first. module_init_function* init; unique_ptr module; const location loc; // Boot location. -- cgit v1.1