9549 |
return 0; |
return 0; |
9550 |
} |
} |
9551 |
|
|
|
|
|
9552 |
#if !defined(LIBTCC) |
#if !defined(LIBTCC) |
9553 |
|
|
9554 |
|
static void tcc_reset_warnings(TCCState *s) |
9555 |
|
{ |
9556 |
|
int i; |
9557 |
|
const WarningDef *p; |
9558 |
|
|
9559 |
|
for(i = 0, p = warning_defs; i < countof(warning_defs); i++, p++) { |
9560 |
|
*(int *)((uint8_t *)s + p->offset) = 0; |
9561 |
|
} |
9562 |
|
} |
9563 |
|
|
9564 |
/* extract the basename of a file */ |
/* extract the basename of a file */ |
9565 |
static const char *tcc_basename(const char *name) |
static const char *tcc_basename(const char *name) |
9566 |
{ |
{ |
9605 |
" -bench output compilation statistics\n" |
" -bench output compilation statistics\n" |
9606 |
" -run run compiled source\n" |
" -run run compiled source\n" |
9607 |
" -Wwarning set or reset (with 'no-' prefix) 'warning'\n" |
" -Wwarning set or reset (with 'no-' prefix) 'warning'\n" |
9608 |
|
" -w disable all warnings\n" |
9609 |
"Preprocessor options:\n" |
"Preprocessor options:\n" |
9610 |
" -Idir add include path 'dir'\n" |
" -Idir add include path 'dir'\n" |
9611 |
" -Dsym[=val] define 'sym' with value 'val'\n" |
" -Dsym[=val] define 'sym' with value 'val'\n" |
9662 |
TCC_OPTION_rdynamic, |
TCC_OPTION_rdynamic, |
9663 |
TCC_OPTION_run, |
TCC_OPTION_run, |
9664 |
TCC_OPTION_v, |
TCC_OPTION_v, |
9665 |
|
TCC_OPTION_w, |
9666 |
}; |
}; |
9667 |
|
|
9668 |
static const TCCOption tcc_options[] = { |
static const TCCOption tcc_options[] = { |
9695 |
{ "nostdlib", TCC_OPTION_nostdlib, 0 }, |
{ "nostdlib", TCC_OPTION_nostdlib, 0 }, |
9696 |
{ "print-search-dirs", TCC_OPTION_print_search_dirs, 0 }, |
{ "print-search-dirs", TCC_OPTION_print_search_dirs, 0 }, |
9697 |
{ "v", TCC_OPTION_v, 0 }, |
{ "v", TCC_OPTION_v, 0 }, |
9698 |
|
{ "w", TCC_OPTION_w, 0 }, |
9699 |
{ NULL }, |
{ NULL }, |
9700 |
}; |
}; |
9701 |
|
|
9871 |
goto unsupported_option; |
goto unsupported_option; |
9872 |
} |
} |
9873 |
break; |
break; |
9874 |
|
case TCC_OPTION_w: |
9875 |
|
tcc_reset_warnings(s); |
9876 |
|
break; |
9877 |
case TCC_OPTION_rdynamic: |
case TCC_OPTION_rdynamic: |
9878 |
s->rdynamic = 1; |
s->rdynamic = 1; |
9879 |
break; |
break; |