- make clang accept unportable code in libtcc1.c
- add -dumpversion cmd.line opt
This commit is contained in:
parent
944627c479
commit
062efe6ab8
3 changed files with 11 additions and 0 deletions
5
Makefile
5
Makefile
|
|
@ -25,6 +25,11 @@ endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# make clang accept gnuisms in libtcc1.c
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
CFLAGS+=-fheinous-gnu-extensions
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_WIN64
|
ifdef CONFIG_WIN64
|
||||||
CONFIG_WIN32=yes
|
CONFIG_WIN32=yes
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
5
libtcc.c
5
libtcc.c
|
|
@ -1643,6 +1643,7 @@ enum {
|
||||||
TCC_OPTION_MD,
|
TCC_OPTION_MD,
|
||||||
TCC_OPTION_MF,
|
TCC_OPTION_MF,
|
||||||
TCC_OPTION_x,
|
TCC_OPTION_x,
|
||||||
|
TCC_OPTION_dumpversion
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TCC_OPTION_HAS_ARG 0x0001
|
#define TCC_OPTION_HAS_ARG 0x0001
|
||||||
|
|
@ -1693,6 +1694,7 @@ static const TCCOption tcc_options[] = {
|
||||||
{ "MD", TCC_OPTION_MD, 0},
|
{ "MD", TCC_OPTION_MD, 0},
|
||||||
{ "MF", TCC_OPTION_MF, TCC_OPTION_HAS_ARG },
|
{ "MF", TCC_OPTION_MF, TCC_OPTION_HAS_ARG },
|
||||||
{ "x", TCC_OPTION_x, TCC_OPTION_HAS_ARG },
|
{ "x", TCC_OPTION_x, TCC_OPTION_HAS_ARG },
|
||||||
|
{ "dumpversion", TCC_OPTION_dumpversion, 0},
|
||||||
{ NULL, 0, 0 },
|
{ NULL, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1870,6 +1872,9 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv)
|
||||||
case TCC_OPTION_MF:
|
case TCC_OPTION_MF:
|
||||||
s->deps_outfile = tcc_strdup(optarg);
|
s->deps_outfile = tcc_strdup(optarg);
|
||||||
break;
|
break;
|
||||||
|
case TCC_OPTION_dumpversion:
|
||||||
|
printf ("%s\n", TCC_VERSION);
|
||||||
|
exit(0);
|
||||||
case TCC_OPTION_O:
|
case TCC_OPTION_O:
|
||||||
case TCC_OPTION_pedantic:
|
case TCC_OPTION_pedantic:
|
||||||
case TCC_OPTION_pipe:
|
case TCC_OPTION_pipe:
|
||||||
|
|
|
||||||
1
tcc.c
1
tcc.c
|
|
@ -38,6 +38,7 @@ static void help(void)
|
||||||
" -w disable all warnings\n"
|
" -w disable all warnings\n"
|
||||||
" -v show version\n"
|
" -v show version\n"
|
||||||
" -vv show included files (as sole argument: show search paths)\n"
|
" -vv show included files (as sole argument: show search paths)\n"
|
||||||
|
" -dumpversion\n"
|
||||||
" -bench show compilation statistics\n"
|
" -bench show compilation statistics\n"
|
||||||
"Preprocessor options:\n"
|
"Preprocessor options:\n"
|
||||||
" -E preprocess only\n"
|
" -E preprocess only\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue