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/cc/init.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libbuild2/cc/init.cxx') 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 ("config.cc.id"); v.insert ("config.cc.hinter"); // Hinting module. v.insert ("config.cc.pattern"); + v.insert ("config.cc.mode"); v.insert ("config.cc.target"); // Compiler runtime and C standard library. @@ -209,6 +210,15 @@ namespace build2 cast_empty (h["config.cc.pattern"]); } + // config.cc.mode + // + { + // This value could be hinted. + // + rs.assign ("cc.mode") = + cast_empty (h["config.cc.mode"]); + } + // cc.runtime // cc.stdlib // -- cgit v1.1