aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/gcc.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-10-18 14:05:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-10-18 14:05:03 +0200
commit0d6f835ffb582296d24a8d1dd479e2703e075ee3 (patch)
tree214f9ceb5699438497c8e0dcf047c167cfaf6132 /libbuild2/cc/gcc.cxx
parenta566a3acc84386e4738711d27a250f63e59cbb6b (diff)
Add ability to specify "compiler mode" options as part of config.{c,cxx}
Such options are (normally) not overridden by buildfiles and are passed last (after cc.coptions and {c,cxx}.coptions) in the resulting command lines. They are also cross-hinted between config.c and config.cxx. For example: $ b config.cxx="g++ -m64"
Diffstat (limited to 'libbuild2/cc/gcc.cxx')
-rw-r--r--libbuild2/cc/gcc.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/libbuild2/cc/gcc.cxx b/libbuild2/cc/gcc.cxx
index 9eb8925..cf0ccdc 100644
--- a/libbuild2/cc/gcc.cxx
+++ b/libbuild2/cc/gcc.cxx
@@ -31,13 +31,11 @@ namespace build2
{
dir_paths r;
- cstrings args;
- string std; // Storage.
-
- args.push_back (xc.recall_string ());
+ cstrings args {xc.recall_string ()};
append_options (args, rs, c_coptions);
append_options (args, rs, x_coptions);
append_options (args, tstd);
+ append_options (args, rs, x_mode);
// Compile as.
//
@@ -182,15 +180,13 @@ namespace build2
//
dir_paths r;
- cstrings args;
- string std; // Storage.
-
- args.push_back (xc.recall_string ());
+ cstrings args {xc.recall_string ()};
append_options (args, rs, c_coptions);
append_options (args, rs, x_coptions);
append_options (args, tstd);
append_options (args, rs, c_loptions);
append_options (args, rs, x_loptions);
+ append_options (args, rs, x_mode);
args.push_back ("-print-search-dirs");
args.push_back (nullptr);