From db73844a1e11787025a8642f69a52b5f9c87aea2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Jul 2020 08:05:41 +0200 Subject: Fold translated *.std options into compiler mode options This way they are accessible in ad hoc recipes. --- libbuild2/cc/module.cxx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'libbuild2/cc/module.cxx') 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 (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 (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 (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; -- cgit v1.1