aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-03-11 12:05:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-03-11 12:05:37 +0200
commit42257647f90d9180cfbc5b20f8b1b7a0ffef7e26 (patch)
tree909d8d327883af5da3ddce8ed6a00e6fa62f7aab /libbuild2/cc/module.cxx
parent891d13075769cbe1c50be3acd191359490b0af9a (diff)
Minor config variable lookup cleanups
Diffstat (limited to 'libbuild2/cc/module.cxx')
-rw-r--r--libbuild2/cc/module.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/libbuild2/cc/module.cxx b/libbuild2/cc/module.cxx
index d8365e4..138a11b 100644
--- a/libbuild2/cc/module.cxx
+++ b/libbuild2/cc/module.cxx
@@ -113,11 +113,12 @@ namespace build2
// user changes the source of the pattern/mode, this one will get
// updated as well.
//
- p = config::required (rs,
- config_x,
- move (d),
- false,
- cc_loaded ? config::save_commented : 0);
+ p = config::required (
+ rs,
+ config_x,
+ move (d),
+ false,
+ cc_loaded ? config::save_default_commented : 0);
}
// Split the value into the compiler path and mode.
@@ -349,6 +350,16 @@ namespace build2
// over. So what we are going to do is only append to a value if
// it came from this scope. Then the usage for merging becomes:
//
+ // @@ 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.
+ //
+ // 2. The module is loaded in the outer scope within the same
+ // project. We are currently thinking whether we should even
+ // support loading of modules in non-root scopes.
+ //
// x.coptions = <overridable options> # Note: '='.
// using x
// x.coptions += <overriding options> # Note: '+='.