glsl/standalone: point which arguments are mandatory

Every now and then I execute the standalone compiler, get the
non-version error, and need to remember what I'm doing wrong

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Alejandro Piñeiro
2018-01-04 16:38:00 +01:00
parent 4a0c24f2dd
commit 937b210551

View File

@@ -62,7 +62,10 @@ usage_fail(const char *name)
"Possible options are:\n";
printf(header, name);
for (const struct option *o = compiler_opts; o->name != 0; ++o) {
printf(" --%s\n", o->name);
printf(" --%s", o->name);
if (o->has_arg == required_argument)
printf(" (mandatory)");
printf("\n");
}
exit(EXIT_FAILURE);
}