Support --version cmdline arg

for simplicity handles like -v (verbose), but enables the usual idiom
of configure scripts to use '$CC --version' to find out the compiler
variant and version.
mob
Michael Matz 2020-05-10 22:47:53 +02:00
parent 29ba50da29
commit 8de7c092f0
1 changed files with 1 additions and 0 deletions

View File

@ -1543,6 +1543,7 @@ static const TCCOption tcc_options[] = {
{ "?", TCC_OPTION_HELP, 0 },
{ "hh", TCC_OPTION_HELP2, 0 },
{ "v", TCC_OPTION_v, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
{ "-version", TCC_OPTION_v, 0 }, /* handle as verbose, also prints version*/
{ "I", TCC_OPTION_I, TCC_OPTION_HAS_ARG },
{ "D", TCC_OPTION_D, TCC_OPTION_HAS_ARG },
{ "U", TCC_OPTION_U, TCC_OPTION_HAS_ARG },