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/init.cxx | |
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/init.cxx')
-rw-r--r-- | libbuild2/cc/init.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libbuild2/cc/init.cxx b/libbuild2/cc/init.cxx index f45a1bf..ac5823b 100644 --- a/libbuild2/cc/init.cxx +++ b/libbuild2/cc/init.cxx @@ -105,6 +105,7 @@ namespace build2 v.insert<string> ("config.cc.id"); v.insert<string> ("config.cc.hinter"); // Hinting module. v.insert<string> ("config.cc.pattern"); + v.insert<strings> ("config.cc.mode"); v.insert<target_triplet> ("config.cc.target"); // Compiler runtime and C standard library. @@ -209,6 +210,15 @@ namespace build2 cast_empty<string> (h["config.cc.pattern"]); } + // config.cc.mode + // + { + // This value could be hinted. + // + rs.assign<strings> ("cc.mode") = + cast_empty<strings> (h["config.cc.mode"]); + } + // cc.runtime // cc.stdlib // |