aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/b-options.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/b-options.cxx')
-rw-r--r--libbuild2/b-options.cxx404
1 files changed, 340 insertions, 64 deletions
diff --git a/libbuild2/b-options.cxx b/libbuild2/b-options.cxx
index 223233a..c107b44 100644
--- a/libbuild2/b-options.cxx
+++ b/libbuild2/b-options.cxx
@@ -19,6 +19,7 @@
#include <utility>
#include <ostream>
#include <sstream>
+#include <cstring>
namespace build2
{
@@ -59,10 +60,31 @@ namespace build2
struct parser<bool>
{
static void
- parse (bool& x, scanner& s)
+ parse (bool& x, bool& xs, scanner& s)
{
- s.next ();
- x = true;
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ const char* v (s.next ());
+
+ if (std::strcmp (v, "1") == 0 ||
+ std::strcmp (v, "true") == 0 ||
+ std::strcmp (v, "TRUE") == 0 ||
+ std::strcmp (v, "True") == 0)
+ x = true;
+ else if (std::strcmp (v, "0") == 0 ||
+ std::strcmp (v, "false") == 0 ||
+ std::strcmp (v, "FALSE") == 0 ||
+ std::strcmp (v, "False") == 0)
+ x = false;
+ else
+ throw invalid_value (o, v);
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
}
static void
@@ -211,6 +233,66 @@ namespace build2
}
};
+ template <typename K, typename V, typename C>
+ struct parser<std::multimap<K, V, C> >
+ {
+ static void
+ parse (std::multimap<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m.insert (typename std::multimap<K, V, C>::value_type (k, v));
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+
+ static void
+ merge (std::multimap<K, V, C>& b, const std::multimap<K, V, C>& a)
+ {
+ for (typename std::multimap<K, V, C>::const_iterator i (a.begin ());
+ i != a.end ();
+ ++i)
+ b.insert (typename std::multimap<K, V, C>::value_type (i->first,
+ i->second));
+ }
+ };
+
template <typename X, typename T, T X::*M>
void
thunk (X& x, scanner& s)
@@ -218,6 +300,14 @@ namespace build2
parser<T>::parse (x.*M, s);
}
+ template <typename X, bool X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ s.next ();
+ x.*M = true;
+ }
+
template <typename X, typename T, T X::*M, bool X::*S>
void
thunk (X& x, scanner& s)
@@ -229,7 +319,6 @@ namespace build2
}
#include <map>
-#include <cstring>
namespace build2
{
@@ -247,10 +336,10 @@ namespace build2
verbose_ (1),
verbose_specified_ (false),
stat_ (),
- dump_ (),
- dump_specified_ (false),
progress_ (),
no_progress_ (),
+ diag_color_ (),
+ no_diag_color_ (),
jobs_ (),
jobs_specified_ (false),
max_jobs_ (),
@@ -263,12 +352,26 @@ namespace build2
max_stack_specified_ (false),
serial_stop_ (),
dry_run_ (),
+ no_diag_buffer_ (),
match_only_ (),
+ load_only_ (),
no_external_modules_ (),
structured_result_ (),
structured_result_specified_ (false),
mtime_check_ (),
no_mtime_check_ (),
+ dump_ (),
+ dump_specified_ (false),
+ dump_format_ (),
+ dump_format_specified_ (false),
+ dump_scope_ (),
+ dump_scope_specified_ (false),
+ dump_target_ (),
+ dump_target_specified_ (false),
+ trace_match_ (),
+ trace_match_specified_ (false),
+ trace_execute_ (),
+ trace_execute_specified_ (false),
no_column_ (),
no_line_ (),
buildfile_ (),
@@ -403,13 +506,6 @@ namespace build2
this->stat_, a.stat_);
}
- if (a.dump_specified_)
- {
- ::build2::build::cli::parser< std::set<string>>::merge (
- this->dump_, a.dump_);
- this->dump_specified_ = true;
- }
-
if (a.progress_)
{
::build2::build::cli::parser< bool>::merge (
@@ -422,6 +518,18 @@ namespace build2
this->no_progress_, a.no_progress_);
}
+ if (a.diag_color_)
+ {
+ ::build2::build::cli::parser< bool>::merge (
+ this->diag_color_, a.diag_color_);
+ }
+
+ if (a.no_diag_color_)
+ {
+ ::build2::build::cli::parser< bool>::merge (
+ this->no_diag_color_, a.no_diag_color_);
+ }
+
if (a.jobs_specified_)
{
::build2::build::cli::parser< size_t>::merge (
@@ -469,12 +577,24 @@ namespace build2
this->dry_run_, a.dry_run_);
}
+ if (a.no_diag_buffer_)
+ {
+ ::build2::build::cli::parser< bool>::merge (
+ this->no_diag_buffer_, a.no_diag_buffer_);
+ }
+
if (a.match_only_)
{
::build2::build::cli::parser< bool>::merge (
this->match_only_, a.match_only_);
}
+ if (a.load_only_)
+ {
+ ::build2::build::cli::parser< bool>::merge (
+ this->load_only_, a.load_only_);
+ }
+
if (a.no_external_modules_)
{
::build2::build::cli::parser< bool>::merge (
@@ -500,6 +620,48 @@ namespace build2
this->no_mtime_check_, a.no_mtime_check_);
}
+ if (a.dump_specified_)
+ {
+ ::build2::build::cli::parser< strings>::merge (
+ this->dump_, a.dump_);
+ this->dump_specified_ = true;
+ }
+
+ if (a.dump_format_specified_)
+ {
+ ::build2::build::cli::parser< string>::merge (
+ this->dump_format_, a.dump_format_);
+ this->dump_format_specified_ = true;
+ }
+
+ if (a.dump_scope_specified_)
+ {
+ ::build2::build::cli::parser< dir_paths>::merge (
+ this->dump_scope_, a.dump_scope_);
+ this->dump_scope_specified_ = true;
+ }
+
+ if (a.dump_target_specified_)
+ {
+ ::build2::build::cli::parser< vector<pair<name, optional<name>>>>::merge (
+ this->dump_target_, a.dump_target_);
+ this->dump_target_specified_ = true;
+ }
+
+ if (a.trace_match_specified_)
+ {
+ ::build2::build::cli::parser< vector<name>>::merge (
+ this->trace_match_, a.trace_match_);
+ this->trace_match_specified_ = true;
+ }
+
+ if (a.trace_execute_specified_)
+ {
+ ::build2::build::cli::parser< vector<name>>::merge (
+ this->trace_execute_, a.trace_execute_);
+ this->trace_execute_specified_ = true;
+ }
+
if (a.no_column_)
{
::build2::build::cli::parser< bool>::merge (
@@ -628,12 +790,6 @@ namespace build2
<< "\033[1m--stat\033[0m Display build statistics." << ::std::endl;
os << std::endl
- << "\033[1m--dump\033[0m \033[4mphase\033[0m Dump the build system state after the specified phase." << ::std::endl
- << " Valid \033[4mphase\033[0m values are \033[1mload\033[0m (after loading \033[1mbuildfiles\033[0m)" << ::std::endl
- << " and \033[1mmatch\033[0m (after matching rules to targets). Repeat" << ::std::endl
- << " this option to dump the state after multiple phases." << ::std::endl;
-
- os << std::endl
<< "\033[1m--progress\033[0m Display build progress. If printing to a terminal the" << ::std::endl
<< " progress is displayed by default for low verbosity" << ::std::endl
<< " levels. Use \033[1m--no-progress\033[0m to suppress." << ::std::endl;
@@ -642,6 +798,19 @@ namespace build2
<< "\033[1m--no-progress\033[0m Don't display build progress." << ::std::endl;
os << std::endl
+ << "\033[1m--diag-color\033[0m Use color in diagnostics. If printing to a terminal the" << ::std::endl
+ << " color is used by default provided the terminal is not" << ::std::endl
+ << " dumb. Use \033[1m--no-diag-color\033[0m to suppress." << ::std::endl
+ << ::std::endl
+ << " This option affects the diagnostics printed by the" << ::std::endl
+ << " build system itself. Some rules may also choose to" << ::std::endl
+ << " propagate its value to tools (such as compilers) that" << ::std::endl
+ << " they invoke." << ::std::endl;
+
+ os << std::endl
+ << "\033[1m--no-diag-color\033[0m Don't use color in diagnostics." << ::std::endl;
+
+ os << std::endl
<< "\033[1m--jobs\033[0m|\033[1m-j\033[0m \033[4mnum\033[0m Number of active jobs to perform in parallel. This" << ::std::endl
<< " includes both the number of active threads inside the" << ::std::endl
<< " build system as well as the number of external commands" << ::std::endl
@@ -693,7 +862,10 @@ namespace build2
<< " build system errors rather than compilation errors." << ::std::endl
<< " Note that if you don't want to keep going but still" << ::std::endl
<< " want parallel execution, add \033[1m--jobs|-j\033[0m (for example \033[1m-j" << ::std::endl
- << " 0\033[0m for default concurrency)." << ::std::endl;
+ << " 0\033[0m for default concurrency). Note also that during" << ::std::endl
+ << " serial execution there is no diagnostics buffering and" << ::std::endl
+ << " child process' \033[1mstderr\033[0m is a terminal (unless redirected;" << ::std::endl
+ << " see \033[1m--no-diag-buffer\033[0m for details)." << ::std::endl;
os << std::endl
<< "\033[1m--dry-run\033[0m|\033[1m-n\033[0m Print commands without actually executing them. Note" << ::std::endl
@@ -706,8 +878,30 @@ namespace build2
<< " meta-operation supports this mode." << ::std::endl;
os << std::endl
- << "\033[1m--match-only\033[0m Match the rules but do not execute the operation. This" << ::std::endl
- << " mode is primarily useful for profiling." << ::std::endl;
+ << "\033[1m--no-diag-buffer\033[0m Do not buffer diagnostics from child processes. By" << ::std::endl
+ << " default, unless running serially, such diagnostics is" << ::std::endl
+ << " buffered and printed all at once after each child exits" << ::std::endl
+ << " in order to prevent interleaving. However, this can" << ::std::endl
+ << " have side-effects since the child process' \033[1mstderr\033[0m is no" << ::std::endl
+ << " longer a terminal. Most notably, the use of color in" << ::std::endl
+ << " diagnostics may be disabled by some programs. On the" << ::std::endl
+ << " other hand, depending on the platform and programs" << ::std::endl
+ << " invoked, the interleaving diagnostics may not break" << ::std::endl
+ << " lines and thus could be tolerable." << ::std::endl;
+
+ os << std::endl
+ << "\033[1m--match-only\033[0m Match the rules without executing the operation. This" << ::std::endl
+ << " mode is primarily useful for profiling and dumping the" << ::std::endl
+ << " build system state." << ::std::endl;
+
+ os << std::endl
+ << "\033[1m--load-only\033[0m Match the rules only to \033[1malias{}\033[0m targets ignoring other" << ::std::endl
+ << " targets and without executing the operation. In" << ::std::endl
+ << " particular, this has the effect of loading all the" << ::std::endl
+ << " subdirectory \033[1mbuildfiles\033[0m that are not explicitly" << ::std::endl
+ << " included. Note that this option can only be used with" << ::std::endl
+ << " the \033[1mperform(update)\033[0m action on an \033[1malias{}\033[0m target," << ::std::endl
+ << " usually \033[1mdir{}\033[0m." << ::std::endl;
os << std::endl
<< "\033[1m--no-external-modules\033[0m Don't load external modules during project bootstrap." << ::std::endl
@@ -736,8 +930,9 @@ namespace build2
<< " the outer operation is specified in parenthesis. For" << ::std::endl
<< " example:" << ::std::endl
<< ::std::endl
- << " unchanged perform update(test) /tmp/dir{hello/}" << ::std::endl
- << " changed perform test /tmp/hello/exe{test}" << ::std::endl
+ << " unchanged perform update(test)" << ::std::endl
+ << " /tmp/hello/hello/exe{hello}" << ::std::endl
+ << " changed perform test /tmp/hello/hello/exe{hello}" << ::std::endl
<< ::std::endl
<< " If the output format is \033[1mjson\033[0m, then the output is a JSON" << ::std::endl
<< " array of objects which are the serialized" << ::std::endl
@@ -747,7 +942,7 @@ namespace build2
<< " struct target_action_result" << ::std::endl
<< " {" << ::std::endl
<< " string target;" << ::std::endl
- << " string quoted_target;" << ::std::endl
+ << " string display_target;" << ::std::endl
<< " string target_type;" << ::std::endl
<< " optional<string> target_path;" << ::std::endl
<< " string meta_operation;" << ::std::endl
@@ -760,20 +955,20 @@ namespace build2
<< ::std::endl
<< " [" << ::std::endl
<< " {" << ::std::endl
- << " \"target\": \"/tmp/dir{hello/}\"," << ::std::endl
- << " \"quoted_target\": \"/tmp/dir{hello/}\"," << ::std::endl
- << " \"target_type\": \"dir\"," << ::std::endl
- << " \"target_path\": \"/tmp/hello\"," << ::std::endl
+ << " \"target\": \"/tmp/hello/hello/exe{hello.}\"," << ::std::endl
+ << " \"display_target\": \"/tmp/hello/hello/exe{hello}\"," << ::std::endl
+ << " \"target_type\": \"exe\"," << ::std::endl
+ << " \"target_path\": \"/tmp/hello/hello/hello\"," << ::std::endl
<< " \"meta_operation\": \"perform\"," << ::std::endl
<< " \"operation\": \"update\"," << ::std::endl
<< " \"outer_operation\": \"test\"," << ::std::endl
<< " \"state\": \"unchanged\"" << ::std::endl
<< " }," << ::std::endl
<< " {" << ::std::endl
- << " \"target\": \"/tmp/dir{hello/}\"," << ::std::endl
- << " \"quoted_target\": \"/tmp/dir{hello/}\"," << ::std::endl
- << " \"target_type\": \"dir\"," << ::std::endl
- << " \"target_path\": \"/tmp/hello\"," << ::std::endl
+ << " \"target\": \"/tmp/hello/hello/exe{hello.}\"," << ::std::endl
+ << " \"display_target\": \"/tmp/hello/hello/exe{hello}\"," << ::std::endl
+ << " \"target_type\": \"exe\"," << ::std::endl
+ << " \"target_path\": \"/tmp/hello/hello/hello\"," << ::std::endl
<< " \"meta_operation\": \"perform\"," << ::std::endl
<< " \"operation\": \"test\"," << ::std::endl
<< " \"state\": \"changed\"" << ::std::endl
@@ -784,13 +979,15 @@ namespace build2
<< " overall properties of this format and the semantics of" << ::std::endl
<< " the \033[1mstruct\033[0m serialization." << ::std::endl
<< ::std::endl
- << " The \033[1mtarget\033[0m member is a \"display\" target name, the same" << ::std::endl
- << " as in the \033[1mlines\033[0m format. The \033[1mquoted_target\033[0m member is a" << ::std::endl
- << " target name that, if required, is quoted so that it can" << ::std::endl
- << " be passed back to the driver on the command line. The" << ::std::endl
- << " \033[1mtarget_type\033[0m member is the type of target. The" << ::std::endl
- << " \033[1mtarget_path\033[0m member is an absolute path to the target if" << ::std::endl
- << " the target type is path-based or \033[1mdir\033[0m." << ::std::endl;
+ << " The \033[1mtarget\033[0m member is the target name that is qualified" << ::std::endl
+ << " with the extension (if applicable) and, if required, is" << ::std::endl
+ << " quoted so that it can be passed back to the build" << ::std::endl
+ << " system driver on the command line. The \033[1mdisplay_target\033[0m" << ::std::endl
+ << " member is the unqualified and unquoted \"display\" target" << ::std::endl
+ << " name, the same as in the \033[1mlines\033[0m format. The \033[1mtarget_type\033[0m" << ::std::endl
+ << " member is the type of target. The \033[1mtarget_path\033[0m member" << ::std::endl
+ << " is an absolute path to the target if the target type is" << ::std::endl
+ << " path-based or \033[1mdir\033[0m." << ::std::endl;
os << std::endl
<< "\033[1m--mtime-check\033[0m Perform file modification time sanity checks. These" << ::std::endl
@@ -805,6 +1002,62 @@ namespace build2
<< " \033[1m--mtime-check\033[0m for details." << ::std::endl;
os << std::endl
+ << "\033[1m--dump\033[0m \033[4mphase\033[0m Dump the build system state after the specified phase." << ::std::endl
+ << " Valid \033[4mphase\033[0m values are \033[1mload\033[0m (after loading \033[1mbuildfiles\033[0m)" << ::std::endl
+ << " and \033[1mmatch\033[0m (after matching rules to targets). The \033[1mmatch\033[0m" << ::std::endl
+ << " value also has the \033[1mmatch-pre\033[0m and \033[1mmatch-post\033[0m variants to" << ::std::endl
+ << " dump the state for the pre/post-operations (\033[1mmatch\033[0m dumps" << ::std::endl
+ << " the main operation only). Repeat this option to dump" << ::std::endl
+ << " the state after multiple phases/variants. By default" << ::std::endl
+ << " the entire build state is dumped but this behavior can" << ::std::endl
+ << " be altered with the \033[1m--dump-scope\033[0m and \033[1m--dump-target\033[0m" << ::std::endl
+ << " options. See also the \033[1m--match-only\033[0m and \033[1m--load-only\033[0m" << ::std::endl
+ << " options." << ::std::endl;
+
+ os << std::endl
+ << "\033[1m--dump-format\033[0m \033[4mformat\033[0m Representation format and output stream to use when" << ::std::endl
+ << " dumping the build system state. Valid values for this" << ::std::endl
+ << " option are \033[1mbuildfile\033[0m (a human-readable, Buildfile-like" << ::std::endl
+ << " format written to \033[1mstderr\033[0m; this is the default), and" << ::std::endl
+ << " \033[1mjson-v0.1\033[0m (machine-readable, JSON-based format written" << ::std::endl
+ << " to \033[1mstdout\033[0m). For details on the \033[1mbuildfile\033[0m format, see" << ::std::endl
+ << " Diagnostics and Debugging (b#intro-diag-debug). For" << ::std::endl
+ << " details on the \033[1mjson-v0.1\033[0m format, see the JSON OUTPUT" << ::std::endl
+ << " section below (overall properties) and JSON Dump Format" << ::std::endl
+ << " (b#json-dump) (format specifics). Note that the JSON" << ::std::endl
+ << " format is currently unstable (thus the temporary \033[1m-v0.1\033[0m" << ::std::endl
+ << " suffix)." << ::std::endl
+ << ::std::endl
+ << " Note that because it's possible to end up with multiple" << ::std::endl
+ << " dumps (for example, by specifying the \033[1m--dump-scope\033[0m" << ::std::endl
+ << " and/or \033[1m--dump-target\033[0m options multiple times), the JSON" << ::std::endl
+ << " output is in the \"JSON Lines\" form, that is, without" << ::std::endl
+ << " pretty-printing and with the top-level JSON objects" << ::std::endl
+ << " delimited by newlines. Note also that if the JSON dump" << ::std::endl
+ << " output is combined with \033[1m--structured-result=json\033[0m, then" << ::std::endl
+ << " the structured result is the last line." << ::std::endl;
+
+ os << std::endl
+ << "\033[1m--dump-scope\033[0m \033[4mdir\033[0m Dump the build system state for the specified scope" << ::std::endl
+ << " only. Repeat this option to dump the state of multiple" << ::std::endl
+ << " scopes." << ::std::endl;
+
+ os << std::endl
+ << "\033[1m--dump-target\033[0m \033[4mtarget\033[0m Dump the build system state for the specified target" << ::std::endl
+ << " only. Repeat this option to dump the state of multiple" << ::std::endl
+ << " targets." << ::std::endl;
+
+ os << std::endl
+ << "\033[1m--trace-match\033[0m \033[4mtarget\033[0m Trace rule matching for the specified target. This is" << ::std::endl
+ << " primarily useful during troubleshooting. Repeat this" << ::std::endl
+ << " option to trace multiple targets." << ::std::endl;
+
+ os << std::endl
+ << "\033[1m--trace-execute\033[0m \033[4mtarget\033[0m Trace rule execution for the specified target. This is" << ::std::endl
+ << " primarily useful during troubleshooting. Repeat this" << ::std::endl
+ << " option to trace multiple targets." << ::std::endl;
+
+ os << std::endl
<< "\033[1m--no-column\033[0m Don't print column numbers in diagnostics." << ::std::endl;
os << std::endl
@@ -901,27 +1154,28 @@ namespace build2
&::build2::build::cli::thunk< b_options, uint64_t, &b_options::build2_metadata_,
&b_options::build2_metadata_specified_ >;
_cli_b_options_map_["-v"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::v_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::v_ >;
_cli_b_options_map_["-V"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::V_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::V_ >;
_cli_b_options_map_["--quiet"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::quiet_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::quiet_ >;
_cli_b_options_map_["-q"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::quiet_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::quiet_ >;
_cli_b_options_map_["--silent"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::silent_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::silent_ >;
_cli_b_options_map_["--verbose"] =
&::build2::build::cli::thunk< b_options, uint16_t, &b_options::verbose_,
&b_options::verbose_specified_ >;
_cli_b_options_map_["--stat"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::stat_ >;
- _cli_b_options_map_["--dump"] =
- &::build2::build::cli::thunk< b_options, std::set<string>, &b_options::dump_,
- &b_options::dump_specified_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::stat_ >;
_cli_b_options_map_["--progress"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::progress_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::progress_ >;
_cli_b_options_map_["--no-progress"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::no_progress_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::no_progress_ >;
+ _cli_b_options_map_["--diag-color"] =
+ &::build2::build::cli::thunk< b_options, &b_options::diag_color_ >;
+ _cli_b_options_map_["--no-diag-color"] =
+ &::build2::build::cli::thunk< b_options, &b_options::no_diag_color_ >;
_cli_b_options_map_["--jobs"] =
&::build2::build::cli::thunk< b_options, size_t, &b_options::jobs_,
&b_options::jobs_specified_ >;
@@ -947,28 +1201,50 @@ namespace build2
&::build2::build::cli::thunk< b_options, size_t, &b_options::max_stack_,
&b_options::max_stack_specified_ >;
_cli_b_options_map_["--serial-stop"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::serial_stop_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::serial_stop_ >;
_cli_b_options_map_["-s"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::serial_stop_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::serial_stop_ >;
_cli_b_options_map_["--dry-run"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::dry_run_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::dry_run_ >;
_cli_b_options_map_["-n"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::dry_run_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::dry_run_ >;
+ _cli_b_options_map_["--no-diag-buffer"] =
+ &::build2::build::cli::thunk< b_options, &b_options::no_diag_buffer_ >;
_cli_b_options_map_["--match-only"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::match_only_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::match_only_ >;
+ _cli_b_options_map_["--load-only"] =
+ &::build2::build::cli::thunk< b_options, &b_options::load_only_ >;
_cli_b_options_map_["--no-external-modules"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::no_external_modules_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::no_external_modules_ >;
_cli_b_options_map_["--structured-result"] =
&::build2::build::cli::thunk< b_options, structured_result_format, &b_options::structured_result_,
&b_options::structured_result_specified_ >;
_cli_b_options_map_["--mtime-check"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::mtime_check_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::mtime_check_ >;
_cli_b_options_map_["--no-mtime-check"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::no_mtime_check_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::no_mtime_check_ >;
+ _cli_b_options_map_["--dump"] =
+ &::build2::build::cli::thunk< b_options, strings, &b_options::dump_,
+ &b_options::dump_specified_ >;
+ _cli_b_options_map_["--dump-format"] =
+ &::build2::build::cli::thunk< b_options, string, &b_options::dump_format_,
+ &b_options::dump_format_specified_ >;
+ _cli_b_options_map_["--dump-scope"] =
+ &::build2::build::cli::thunk< b_options, dir_paths, &b_options::dump_scope_,
+ &b_options::dump_scope_specified_ >;
+ _cli_b_options_map_["--dump-target"] =
+ &::build2::build::cli::thunk< b_options, vector<pair<name, optional<name>>>, &b_options::dump_target_,
+ &b_options::dump_target_specified_ >;
+ _cli_b_options_map_["--trace-match"] =
+ &::build2::build::cli::thunk< b_options, vector<name>, &b_options::trace_match_,
+ &b_options::trace_match_specified_ >;
+ _cli_b_options_map_["--trace-execute"] =
+ &::build2::build::cli::thunk< b_options, vector<name>, &b_options::trace_execute_,
+ &b_options::trace_execute_specified_ >;
_cli_b_options_map_["--no-column"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::no_column_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::no_column_ >;
_cli_b_options_map_["--no-line"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::no_line_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::no_line_ >;
_cli_b_options_map_["--buildfile"] =
&::build2::build::cli::thunk< b_options, path, &b_options::buildfile_,
&b_options::buildfile_specified_ >;
@@ -991,11 +1267,11 @@ namespace build2
&::build2::build::cli::thunk< b_options, dir_path, &b_options::default_options_,
&b_options::default_options_specified_ >;
_cli_b_options_map_["--no-default-options"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::no_default_options_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::no_default_options_ >;
_cli_b_options_map_["--help"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::help_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::help_ >;
_cli_b_options_map_["--version"] =
- &::build2::build::cli::thunk< b_options, bool, &b_options::version_ >;
+ &::build2::build::cli::thunk< b_options, &b_options::version_ >;
}
};