From 0d6f835ffb582296d24a8d1dd479e2703e075ee3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 18 Oct 2019 14:05:03 +0200 Subject: 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" --- libbuild2/c/init.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libbuild2/c') 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 ("config.c", true), + v.insert ("config.c", true), v.insert ("config.c.id", true), v.insert ("config.c.version", true), v.insert ("config.c.target", true), @@ -172,6 +172,7 @@ namespace build2 nullptr /* config.c.translatable_headers */, v.insert ("c.path"), + v.insert ("c.mode"), v.insert ("c.sys_lib_dirs"), v.insert ("c.sys_inc_dirs"), @@ -335,6 +336,7 @@ namespace build2 cm.x_info->version.major, cm.x_info->version.minor, cast (rs[cm.x_path]), + cast (rs[cm.x_mode]), cast (rs[cm.x_target]), cm.tstd, -- cgit v1.1