aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/file.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-09-24 10:48:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-09-24 10:59:45 +0200
commita414fa7b0ff469013598ca9ef2999ca6293ee7c1 (patch)
treed0b5b74d026f16a6eec64c4a84f82bb76162f48c /libbuild2/file.cxx
parent9eb84a8134c532029b9f74ced48696994d9c7fc5 (diff)
Add post-boot module function
Diffstat (limited to 'libbuild2/file.cxx')
-rw-r--r--libbuild2/file.cxx11
1 files changed, 10 insertions, 1 deletions
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