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/c/init.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'libbuild2/c/init.cxx') 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 (rs[cm.x_mode]), cast (rs[cm.x_target]), - cm.tstd, - false, // No C modules yet. false, // No __symexport support since no modules. -- cgit v1.1