diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-18 14:05:03 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-18 14:05:03 +0200 |
commit | 0d6f835ffb582296d24a8d1dd479e2703e075ee3 (patch) | |
tree | 214f9ceb5699438497c8e0dcf047c167cfaf6132 /libbuild2/cc/guess.hxx | |
parent | a566a3acc84386e4738711d27a250f63e59cbb6b (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/guess.hxx')
-rw-r--r-- | libbuild2/cc/guess.hxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/libbuild2/cc/guess.hxx b/libbuild2/cc/guess.hxx index d9172dc..d93aaf9 100644 --- a/libbuild2/cc/guess.hxx +++ b/libbuild2/cc/guess.hxx @@ -239,23 +239,27 @@ namespace build2 // that most of it will be the same, at least for C and C++. // const compiler_info& - guess (const char* xm, // Module (for variable names in diagnostics). - lang xl, // Language. - const path& xc, // Compiler path. - const string* xi, // Compiler id (optional). - const string* xv, // Compiler version (optional). - const string* xt, // Compiler target (optional). + guess (const char* xm, // Module (for var names in diagnostics). + lang xl, // Language. + const path& xc, // Compiler path. + const string* xi, // Compiler id (optional). + const string* xv, // Compiler version (optional). + const string* xt, // Compiler target (optional). + const strings& x_mode, // Compiler mode options. const strings* c_poptions, const strings* x_poptions, const strings* c_coptions, const strings* x_coptions, const strings* c_loptions, const strings* x_loptions); - // Given a language, compiler id, and optionally an (empty) pattern, - // return an appropriate default compiler path. + // Given a language, compiler id, optional (empty) pattern, and mode + // return an appropriate default config.x value (compiler path and mode) // // For example, for (lang::cxx, gcc, *-4.9) we will get g++-4.9. // - path - guess_default (lang, const string& cid, const string& pattern); + strings + guess_default (lang, + const string& cid, + const string& pattern, + const strings& mode); } } |