remove --undefok

I think we originally added this for the bots, back in the good old days
when the bot scripts weren't versioned with Skia.  No bots use this now.

Change-Id: Icdee95d27fb928d0215601e082d056e611eb6202
Reviewed-on: https://skia-review.googlesource.com/c/181980
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
This commit is contained in:
Mike Klein 2019-01-07 15:20:54 -06:00 committed by Skia Commit-Bot
parent 21c34824dc
commit 97c7cf16de
3 changed files with 2 additions and 17 deletions

View File

@ -102,8 +102,6 @@ static SkString to_string(int n) {
return str;
}
DECLARE_bool(undefok);
DEFINE_int32(loops, kDefaultLoops, loops_help_txt().c_str());
DEFINE_int32(samples, 10, "Number of samples to measure for each bench.");
@ -503,13 +501,10 @@ void create_configs(SkTArray<Config>* configs) {
// If no just default configs were requested, then we're okay.
if (array.count() == 0 || FLAGS_config.count() == 0 ||
// If we've been told to ignore undefined flags, we're okay.
FLAGS_undefok ||
// Otherwise, make sure that all specified configs have been created.
array.count() == configs->count()) {
return;
}
SkDebugf("Invalid --config. Use --undefok to bypass this warning.\n");
exit(1);
}

View File

@ -63,7 +63,6 @@ extern void SkPDFImageDumpStats();
extern bool gSkForceRasterPipelineBlitter;
DECLARE_bool(undefok);
DEFINE_string(src, "tests gm skp image", "Source types to test.");
DEFINE_bool(nameByHash, false,
"If true, write to FLAGS_writePath[0]/<hash>.png instead of "
@ -1016,13 +1015,10 @@ static bool gather_sinks(const GrContextOptions& grCtxOptions, bool defaultConfi
if (configs.count() == 0 ||
// If we're using the default configs, we're okay.
defaultConfigs ||
// If we've been told to ignore undefined flags, we're okay.
FLAGS_undefok ||
// Otherwise, make sure that all specified configs have become sinks.
configs.count() == gSinks.count()) {
return true;
}
info("Invalid --config. Use --undefok to bypass this warning.\n");
return false;
}

View File

@ -11,8 +11,6 @@
#include <stdlib.h>
DEFINE_bool(undefok, false, "Silently ignore unknown flags instead of crashing.");
template <typename T> static void ignore_result(const T&) {}
bool SkFlagInfo::CreateStringFlag(const char* name, const char* shortName,
@ -349,12 +347,8 @@ void SkCommandLineFlags::Parse(int argc, const char* const * argv) {
i++; // skip YES
} else
#endif
if (FLAGS_undefok) {
SkDebugf("FYI: ignoring unknown flag '%s'.\n", argv[i]);
} else {
SkDebugf("Got unknown flag '%s'. Exiting.\n", argv[i]);
exit(-1);
}
SkDebugf("Got unknown flag '%s'. Exiting.\n", argv[i]);
exit(-1);
}
}
}