aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cxx/init.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/cxx/init.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/cxx/init.cxx')
-rw-r--r--libbuild2/cxx/init.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbuild2/cxx/init.cxx b/libbuild2/cxx/init.cxx
index 9bf54eb..6237d99 100644
--- a/libbuild2/cxx/init.cxx
+++ b/libbuild2/cxx/init.cxx
@@ -391,7 +391,7 @@ namespace build2
// Note: some overridable, some not.
//
- v.insert<path> ("config.cxx", true),
+ v.insert<strings> ("config.cxx", true),
v.insert<string> ("config.cxx.id", true),
v.insert<string> ("config.cxx.version", true),
v.insert<string> ("config.cxx.target", true),
@@ -414,6 +414,7 @@ namespace build2
&v.insert<strings> ("config.cxx.translatable_headers", true),
v.insert<process_path> ("cxx.path"),
+ v.insert<strings> ("cxx.mode"),
v.insert<dir_paths> ("cxx.sys_lib_dirs"),
v.insert<dir_paths> ("cxx.sys_inc_dirs"),
@@ -612,6 +613,7 @@ namespace build2
cm.x_info->version.major,
cm.x_info->version.minor,
cast<process_path> (rs[cm.x_path]),
+ cast<strings> (rs[cm.x_mode]),
cast<target_triplet> (rs[cm.x_target]),
cm.tstd,