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/c/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/c/init.cxx')
-rw-r--r-- | libbuild2/c/init.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbuild2/c/init.cxx b/libbuild2/c/init.cxx index bec20b5..893d285 100644 --- a/libbuild2/c/init.cxx +++ b/libbuild2/c/init.cxx @@ -159,7 +159,7 @@ namespace build2 // Note: some overridable, some not. // - v.insert<path> ("config.c", true), + v.insert<strings> ("config.c", true), v.insert<string> ("config.c.id", true), v.insert<string> ("config.c.version", true), v.insert<string> ("config.c.target", true), @@ -172,6 +172,7 @@ namespace build2 nullptr /* config.c.translatable_headers */, v.insert<process_path> ("c.path"), + v.insert<strings> ("c.mode"), v.insert<dir_paths> ("c.sys_lib_dirs"), v.insert<dir_paths> ("c.sys_inc_dirs"), @@ -335,6 +336,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, |