aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-07-13 08:05:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-07-13 08:05:41 +0200
commitdb73844a1e11787025a8642f69a52b5f9c87aea2 (patch)
tree439ab3e274c130759dd75bb5bd886f9bc37aa404 /libbuild2/cc/module.cxx
parent70b4532ae118accdbe11f1983a81a26927fc9065 (diff)
Fold translated *.std options into compiler mode options
This way they are accessible in ad hoc recipes.
Diffstat (limited to 'libbuild2/cc/module.cxx')
-rw-r--r--libbuild2/cc/module.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/libbuild2/cc/module.cxx b/libbuild2/cc/module.cxx
index a80d770..eed2510 100644
--- a/libbuild2/cc/module.cxx
+++ b/libbuild2/cc/module.cxx
@@ -389,6 +389,7 @@ namespace build2
// config.x.std overrides x.std
//
+ strings& mode (cast<strings> (rs.assign (x_mode))); // Set by guess.
{
lookup l (lookup_config (rs, config_x_std));
@@ -401,9 +402,10 @@ namespace build2
else
v = cast_null<string> (rs[x_std]);
- // Translate x_std value (if any) to the compiler option(s) (if any).
+ // Translate x_std value (if any) to the compiler option(s) (if any)
+ // and fold them into the compiler mode.
//
- tstd = translate_std (xi, tt, rs, v);
+ translate_std (xi, tt, rs, mode, v);
}
// config.x.translatable_header
@@ -546,8 +548,6 @@ namespace build2
//
if (verb >= (new_config ? 2 : 3))
{
- const strings& mode (cast<strings> (rs[x_mode]));
-
diag_record dr (text);
{
@@ -609,12 +609,6 @@ namespace build2
dr << "\n c stdlib " << xi.c_stdlib;
}
- if (!tstd.empty ())
- {
- dr << "\n std "; // One less space.
- for (const string& o: tstd) dr << ' ' << o;
- }
-
if (!xi.pattern.empty ()) // Note: bin_pattern printed by bin
{
dr << "\n pattern " << xi.pattern;