diff --git a/main.cc b/main.cc index 123afd24..fa7479cd 100644 --- a/main.cc +++ b/main.cc @@ -498,6 +498,8 @@ int main(int argc, char **argv) { tbb::global_control tbb_cont(tbb::global_control::max_allowed_parallelism, get_thread_count(args)); + Counter::enabled = args.hasArg(OPT_stat); + if (auto *arg = args.getLastArg(OPT_o)) config.output = arg->getValue(); else diff --git a/options.td b/options.td index 0fa2b700..3c825fd7 100644 --- a/options.td +++ b/options.td @@ -15,3 +15,5 @@ def print_map: F<"print-map">, HelpText<"Print a link map to the standard output">; defm thread_count: Eq<"thread-count", "Number of threads to use">; + +def stat: F<"stat">;