From bed4a6152b8d2c2b3a1f5636a4c6a3848a24080a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 22 Oct 2019 13:19:42 +0200 Subject: Add load_builtin_module() --- libbuild2/module.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libbuild2/module.cxx') diff --git a/libbuild2/module.cxx b/libbuild2/module.cxx index 1bd60a6..c3e4c62 100644 --- a/libbuild2/module.cxx +++ b/libbuild2/module.cxx @@ -33,6 +33,13 @@ namespace build2 { loaded_module_map loaded_modules; + void + load_builtin_module (module_load_function* lf) + { + for (const module_functions* i (lf ()); i->name != nullptr; ++i) + loaded_modules[i->name] = i; + } + // Sorted array of bundled modules (excluding core modules bundled with // libbuild2; see below). // -- cgit v1.1