Implement -include cmdline option

This option includes a file as if '#include "file"' is the first
line of compiled files.  It's processed after all -D/-U options
and is processed per input file.
This commit is contained in:
Michael Matz
2016-06-27 16:40:00 +02:00
parent 21d2b71b5c
commit 9285149548
3 changed files with 24 additions and 0 deletions

4
tcc.h
View File

@ -661,6 +661,10 @@ struct TCCState {
char **crt_paths;
int nb_crt_paths;
/* -include files */
char **cmd_include_files;
int nb_cmd_include_files;
/* error handling */
void *error_opaque;
void (*error_func)(void *opaque, const char *msg);