mirror of
https://github.com/google/benchmark.git
synced 2025-03-15 03:30:10 +08:00
Some platforms and environments don't pass a valid argc/argv. (#607)
Specifically some iOS targets.
This commit is contained in:
parent
d07372e64b
commit
4fbfa2f336
@ -568,7 +568,8 @@ void PrintUsageAndExit() {
|
||||
|
||||
void ParseCommandLineFlags(int* argc, char** argv) {
|
||||
using namespace benchmark;
|
||||
BenchmarkReporter::Context::executable_name = argv[0];
|
||||
BenchmarkReporter::Context::executable_name =
|
||||
(argc && *argc > 0) ? argv[0] : "unknown";
|
||||
for (int i = 1; i < *argc; ++i) {
|
||||
if (ParseBoolFlag(argv[i], "benchmark_list_tests",
|
||||
&FLAGS_benchmark_list_tests) ||
|
||||
|
Loading…
Reference in New Issue
Block a user