aboutsummaryrefslogtreecommitdiff
path: root/build2/module
diff options
context:
space:
mode:
Diffstat (limited to 'build2/module')
-rw-r--r--build2/module15
1 files changed, 12 insertions, 3 deletions
diff --git a/build2/module b/build2/module
index dcfe5d0..314f5a6 100644
--- a/build2/module
+++ b/build2/module
@@ -10,6 +10,7 @@
#include <build2/types>
#include <build2/utility>
+#include <build2/variable>
#include <build2/diagnostics>
namespace build2
@@ -40,8 +41,9 @@ namespace build2
scope& base,
const location&,
unique_ptr<module_base>&,
- bool first, // First time for this project.
- bool optional); // Loaded with 'using?' (optional module).
+ bool first, // First time for this project.
+ bool optional, // Loaded with using? (optional module).
+ const variable_map& hints); // Configuration hints (see below).
struct module_state
@@ -75,12 +77,19 @@ namespace build2
// Return true if the module was both successfully loaded and configured
// (false can only be returned if optional).
//
+ // The config_hints variable map can be used to pass configuration hints
+ // from one module to another. For example, the cxx modude may pass the
+ // target platform (which was extracted from the C++ compiler) to the bin
+ // module (which may not always be able to extract the same information from
+ // its tools).
+ //
bool
load_module (const string& name,
scope& root,
scope& base,
const location&,
- bool optional = false);
+ bool optional = false,
+ const variable_map& config_hints = variable_map ());
// Builtin modules.
//