From a414fa7b0ff469013598ca9ef2999ca6293ee7c1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 24 Sep 2020 10:48:45 +0200 Subject: Add post-boot module function --- libbuild2/file.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libbuild2/file.cxx') diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx index 67aeb77..14b16a7 100644 --- a/libbuild2/file.cxx +++ b/libbuild2/file.cxx @@ -925,7 +925,6 @@ namespace build2 rs.root_extra->project = nullptr; rs.root_extra->amalgamation = nullptr; rs.root_extra->subprojects = nullptr; - } // We assume that bootstrap out cannot load this file explicitly. It // feels wrong to allow this since that makes the whole bootstrap @@ -1248,6 +1247,16 @@ namespace build2 parser p (root.ctx, load_stage::boot); source_hooks (p, root, d, false /* pre */); } + + // Call module's post-boot functions. + // + for (size_t i (0); i != root.root_extra->modules.size (); ++i) + { + module_state& s (root.root_extra->modules[i]); + + if (s.boot_post != nullptr) + boot_post_module (root, s); + } } bool -- cgit v1.1