mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
Add --param, reject -mARG if ARG not 32 or 64
This commit is contained in:
parent
9285149548
commit
b285fc50f3
4
libtcc.c
4
libtcc.c
@ -1523,6 +1523,7 @@ enum {
|
||||
TCC_OPTION_nostdlib,
|
||||
TCC_OPTION_print_search_dirs,
|
||||
TCC_OPTION_rdynamic,
|
||||
TCC_OPTION_param,
|
||||
TCC_OPTION_pedantic,
|
||||
TCC_OPTION_pthread,
|
||||
TCC_OPTION_run,
|
||||
@ -1568,6 +1569,7 @@ static const TCCOption tcc_options[] = {
|
||||
{ "shared", TCC_OPTION_shared, 0 },
|
||||
{ "soname", TCC_OPTION_soname, TCC_OPTION_HAS_ARG },
|
||||
{ "o", TCC_OPTION_o, TCC_OPTION_HAS_ARG },
|
||||
{ "-param", TCC_OPTION_param, TCC_OPTION_HAS_ARG },
|
||||
{ "pedantic", TCC_OPTION_pedantic, 0},
|
||||
{ "pthread", TCC_OPTION_pthread, 0},
|
||||
{ "run", TCC_OPTION_run, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
|
||||
@ -1770,6 +1772,8 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv)
|
||||
s->soname = tcc_strdup(optarg);
|
||||
break;
|
||||
case TCC_OPTION_m:
|
||||
if (strcmp(optarg, "32") && strcmp(optarg, "64"))
|
||||
goto unsupported_option;
|
||||
s->option_m = tcc_strdup(optarg);
|
||||
break;
|
||||
case TCC_OPTION_o:
|
||||
|
Loading…
Reference in New Issue
Block a user