aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/init.cxx24
-rw-r--r--libbuild2/cc/module.cxx9
2 files changed, 18 insertions, 15 deletions
diff --git a/libbuild2/cc/init.cxx b/libbuild2/cc/init.cxx
index 723b678..8d66376 100644
--- a/libbuild2/cc/init.cxx
+++ b/libbuild2/cc/init.cxx
@@ -74,7 +74,7 @@ namespace build2
//
load_module (rs, rs, "bin.vars", loc);
- // Enter variables. Note: some overridable, some not.
+ // Enter variables.
//
auto& vp (rs.var_pool ());
@@ -82,11 +82,11 @@ namespace build2
// NOTE: remember to update documentation if changing anything here.
//
- vp.insert<strings> ("config.cc.poptions", true);
- vp.insert<strings> ("config.cc.coptions", true);
- vp.insert<strings> ("config.cc.loptions", true);
- vp.insert<strings> ("config.cc.aoptions", true);
- vp.insert<strings> ("config.cc.libs", true);
+ vp.insert<strings> ("config.cc.poptions");
+ vp.insert<strings> ("config.cc.coptions");
+ vp.insert<strings> ("config.cc.loptions");
+ vp.insert<strings> ("config.cc.aoptions");
+ vp.insert<strings> ("config.cc.libs");
vp.insert<strings> ("cc.poptions");
vp.insert<strings> ("cc.coptions");
@@ -101,11 +101,11 @@ namespace build2
// Hint variables (not overridable).
//
- vp.insert<string> ("config.cc.id");
- vp.insert<string> ("config.cc.hinter"); // Hinting module.
- vp.insert<string> ("config.cc.pattern");
- vp.insert<strings> ("config.cc.mode");
- vp.insert<target_triplet> ("config.cc.target");
+ vp.insert<string> ("config.cc.id", false);
+ vp.insert<string> ("config.cc.hinter", false); // Hinting module.
+ vp.insert<string> ("config.cc.pattern", false);
+ vp.insert<strings> ("config.cc.mode", false);
+ vp.insert<target_triplet> ("config.cc.target", false);
// Compiler runtime and C standard library.
//
@@ -137,7 +137,7 @@ namespace build2
// Ability to disable using preprocessed output for compilation.
//
- vp.insert<bool> ("config.cc.reprocess", true);
+ vp.insert<bool> ("config.cc.reprocess");
vp.insert<bool> ("cc.reprocess");
// Register scope operation callback.
diff --git a/libbuild2/cc/module.cxx b/libbuild2/cc/module.cxx
index d6c337d..2b2604b 100644
--- a/libbuild2/cc/module.cxx
+++ b/libbuild2/cc/module.cxx
@@ -78,7 +78,7 @@ namespace build2
// Must be the same as in module's init().
//
- const variable& v (vp.insert<strings> ("config." + m, true));
+ const variable& v (vp.insert<strings> ("config." + m));
if (rs[v].defined ())
{
@@ -358,8 +358,11 @@ namespace build2
// @@ There are actually two cases to this issue:
//
// 1. The module is loaded in the outer project (e.g., tests inside a
- // project). It feels like this should be handled with project-
- // specific variable visibility.
+ // project). It feels like this should be handled with project
+ // variable visibility. And now it is with the project being the
+ // default. Note that this is the reason we don't need any of this
+ // for the project configuration: there the config.* variables are
+ // always set on the project root.
//
// 2. The module is loaded in the outer scope within the same
// project. We are currently thinking whether we should even