diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-04 16:04:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-04 16:04:39 +0200 |
commit | 759e714238438cccf74f035e1ba11c925b27cd55 (patch) | |
tree | 36683f9df793d0100f49189dad9cabf09be78d89 /build2/module.hxx | |
parent | b1ef30736694f644e2e473429257a18b64a7615c (diff) |
Load config.build in init(), not boot()
We now make sure the config module is init'ed first.
Diffstat (limited to 'build2/module.hxx')
-rw-r--r-- | build2/module.hxx | 8 |
1 files changed, 6 insertions, 2 deletions
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<module_base>&); @@ -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_base> module; const location loc; // Boot location. |