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/utility.hxx | |
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/utility.hxx')
-rw-r--r-- | libbuild2/utility.hxx | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx index beacd2f..0422786 100644 --- a/libbuild2/utility.hxx +++ b/libbuild2/utility.hxx @@ -607,23 +607,32 @@ namespace build2 // template <typename T> bool - find_options (initializer_list<const char*>, + find_options (const initializer_list<const char*>&, T&, const variable&, bool = false); template <typename T> bool - find_options (initializer_list<const char*>, T&, const char*, bool = false); + find_options (const initializer_list<const char*>&, + T&, + const char*, + bool = false); LIBBUILD2_SYMEXPORT bool - find_options (initializer_list<const char*>, const lookup&, bool = false); + find_options (const initializer_list<const char*>&, + const lookup&, + bool = false); LIBBUILD2_SYMEXPORT bool - find_options (initializer_list<const char*>, const strings&, bool = false); + find_options (const initializer_list<const char*>&, + const strings&, + bool = false); LIBBUILD2_SYMEXPORT bool - find_options (initializer_list<const char*>, const cstrings&, bool = false); + find_options (const initializer_list<const char*>&, + const cstrings&, + bool = false); // As above but look for an option that has the specified prefix. Return the // pointer to option or NULL if not found (thus can be used as bool). @@ -651,29 +660,29 @@ namespace build2 // template <typename T> const string* - find_option_prefixes (initializer_list<const char*>, + find_option_prefixes (const initializer_list<const char*>&, T&, const variable&, bool = false); template <typename T> const string* - find_option_prefixes (initializer_list<const char*>, + find_option_prefixes (const initializer_list<const char*>&, T&, const char*, bool = false); LIBBUILD2_SYMEXPORT const string* - find_option_prefixes (initializer_list<const char*>, + find_option_prefixes (const initializer_list<const char*>&, const lookup&, bool = false); LIBBUILD2_SYMEXPORT const string* - find_option_prefixes (initializer_list<const char*>, + find_option_prefixes (const initializer_list<const char*>&, const strings&, bool = false); LIBBUILD2_SYMEXPORT const char* - find_option_prefixes (initializer_list<const char*>, + find_option_prefixes (const initializer_list<const char*>&, const cstrings&, bool = false); |