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/common.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/common.hxx')
-rw-r--r-- | libbuild2/cc/common.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libbuild2/cc/common.hxx b/libbuild2/cc/common.hxx index 68546f6..0548d6f 100644 --- a/libbuild2/cc/common.hxx +++ b/libbuild2/cc/common.hxx @@ -56,6 +56,7 @@ namespace build2 const variable* config_x_translatable_headers; const variable& x_path; // Compiler process path. + const variable& x_mode; // Compiler mode options. const variable& x_sys_lib_dirs; // System library search directories. const variable& x_sys_inc_dirs; // System header search directories. @@ -147,6 +148,7 @@ namespace build2 uint64_t cmaj; // x.version.major uint64_t cmin; // x.version.minor const process_path& cpath; // x.path + const strings& cmode; // x.mode (options) const target_triplet& ctgt; // x.target const string& tsys; // x.target.system @@ -204,6 +206,7 @@ namespace build2 compiler_class cl, uint64_t mj, uint64_t mi, const process_path& path, + const strings& mode, const target_triplet& tgt, const strings& std, bool fm, @@ -223,7 +226,7 @@ namespace build2 x_uninstall (uninstall), ctype (ct), cvariant (cv), cclass (cl), cmaj (mj), cmin (mi), - cpath (path), + cpath (path), cmode (mode), ctgt (tgt), tsys (ctgt.system), tclass (ctgt.class_), tstd (std), modules (fm), |