From f66848dbd677b1027bade5728e04954c313231af Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 Apr 2023 13:12:04 +0200 Subject: Make sure main module_functions entry is after submodules --- libbuild2/bin/init.cxx | 2 +- libbuild2/c/init.cxx | 2 +- libbuild2/cxx/init.cxx | 2 +- libbuild2/module.hxx | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'libbuild2') diff --git a/libbuild2/bin/init.cxx b/libbuild2/bin/init.cxx index 1bdf6a6..05a9c60 100644 --- a/libbuild2/bin/init.cxx +++ b/libbuild2/bin/init.cxx @@ -1217,7 +1217,6 @@ namespace build2 {"bin.vars", nullptr, vars_init}, {"bin.config", nullptr, config_init}, - {"bin", nullptr, init}, {"bin.ar.config", nullptr, ar_config_init}, {"bin.ar", nullptr, ar_init}, {"bin.ld.config", nullptr, ld_config_init}, @@ -1227,6 +1226,7 @@ namespace build2 {"bin.nm.config", nullptr, nm_config_init}, {"bin.nm", nullptr, nm_init}, {"bin.def", nullptr, def_init}, + {"bin", nullptr, init}, {nullptr, nullptr, nullptr} }; diff --git a/libbuild2/c/init.cxx b/libbuild2/c/init.cxx index 0092b81..222a4fe 100644 --- a/libbuild2/c/init.cxx +++ b/libbuild2/c/init.cxx @@ -493,9 +493,9 @@ namespace build2 {"c.guess", nullptr, guess_init}, {"c.config", nullptr, config_init}, - {"c", nullptr, init}, {"c.objc", nullptr, objc_init}, {"c.as-cpp", nullptr, as_cpp_init}, + {"c", nullptr, init}, {nullptr, nullptr, nullptr} }; diff --git a/libbuild2/cxx/init.cxx b/libbuild2/cxx/init.cxx index 732b08b..2929def 100644 --- a/libbuild2/cxx/init.cxx +++ b/libbuild2/cxx/init.cxx @@ -934,8 +934,8 @@ namespace build2 {"cxx.guess", nullptr, guess_init}, {"cxx.config", nullptr, config_init}, - {"cxx", nullptr, init}, {"cxx.objcxx", nullptr, objcxx_init}, + {"cxx", nullptr, init}, {nullptr, nullptr, nullptr} }; diff --git a/libbuild2/module.hxx b/libbuild2/module.hxx index c638c70..6cdd040 100644 --- a/libbuild2/module.hxx +++ b/libbuild2/module.hxx @@ -151,9 +151,9 @@ namespace build2 // // The part in the function name is the main module name without // submodule components (for example, `c` in `c.config`) and the load - // function is expected to return boot/init functions for all its submodules - // (if any) as well as for the module itself as an array of module_functions - // terminated with an all-NULL entry. + // function is expected to return boot/init functions as an array of + // module_functions: entries for all its submodules (if any) first, followed + // by the module itself, and terminated with an all-NULL entry. // // Note that the load function is guaranteed to be called during serial // execution (either from main() or during the load phase). -- cgit v1.1