diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-04-19 10:27:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-04-19 10:27:14 +0200 |
commit | bc582eb32448bf7eb61ab3b1c76597885c8ec02a (patch) | |
tree | 64ed4501fac82b25e03e9f59a2d5a91a6450bcbc /libbuild2/file.cxx | |
parent | 7a995b778ab86c8ae63ba8f86950fd25e3ab5162 (diff) |
Fix several issues in build system module importation logicmodule-import
Diffstat (limited to 'libbuild2/file.cxx')
-rw-r--r-- | libbuild2/file.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx index acfb5d7..99eab96 100644 --- a/libbuild2/file.cxx +++ b/libbuild2/file.cxx @@ -1337,9 +1337,9 @@ namespace build2 // Call module's post-boot functions. // - for (size_t i (0); i != root.root_extra->modules.size (); ++i) + for (size_t i (0); i != root.root_extra->loaded_modules.size (); ++i) { - module_state& s (root.root_extra->modules[i]); + module_state& s (root.root_extra->loaded_modules[i]); if (s.boot_post != nullptr) boot_post_module (root, s); @@ -1556,11 +1556,11 @@ namespace build2 // Note that init() can load additional modules invalidating iterators. // auto init_modules = - [&root, n = root.root_extra->modules.size ()] (module_boot_init v) + [&root, n = root.root_extra->loaded_modules.size ()] (module_boot_init v) { for (size_t i (0); i != n; ++i) { - module_state& s (root.root_extra->modules[i]); + module_state& s (root.root_extra->loaded_modules[i]); if (s.boot_init && *s.boot_init == v) init_module (root, root, s.name, s.loc); @@ -2085,6 +2085,9 @@ namespace build2 // Return empty name if an ad hoc import resulted in a NULL target (only // allowed if optional is true). // + // Note that this function has a side effect of potentially marking some + // config.import.* variables as used. + // pair<name, optional<dir_path>> import_search (bool& new_value, scope& ibase, |