aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/c
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/c
parent70b4532ae118accdbe11f1983a81a26927fc9065 (diff)
Fold translated *.std options into compiler mode options
This way they are accessible in ad hoc recipes.
Diffstat (limited to 'libbuild2/c')
-rw-r--r--libbuild2/c/init.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/libbuild2/c/init.cxx b/libbuild2/c/init.cxx
index 7760808..38ee3d2 100644
--- a/libbuild2/c/init.cxx
+++ b/libbuild2/c/init.cxx
@@ -36,23 +36,23 @@ namespace build2
explicit
config_module (config_data&& d): cc::config_module (move (d)) {}
- virtual strings
+ virtual void
translate_std (const compiler_info&,
const target_triplet&,
scope&,
+ strings&,
const string*) const override;
};
using cc::module;
- strings config_module::
+ void config_module::
translate_std (const compiler_info& ci,
const target_triplet&,
scope& rs,
+ strings& mode,
const string* v) const
{
- strings r;
-
switch (ci.class_)
{
case compiler_class::msvc:
@@ -116,13 +116,11 @@ namespace build2
else if (*v == "90") o += "c90";
else o += *v; // In case the user specifies `gnuNN` or some such.
- r.push_back (move (o));
+ mode.insert (mode.begin (), move (o));
}
break;
}
}
-
- return r;
}
static const char* const hinters[] = {"cxx", nullptr};
@@ -340,8 +338,6 @@ namespace build2
cast<strings> (rs[cm.x_mode]),
cast<target_triplet> (rs[cm.x_target]),
- cm.tstd,
-
false, // No C modules yet.
false, // No __symexport support since no modules.