diff options
| author | seyko <seyko2@gmail.com> | 2016-04-13 07:05:38 +0300 |
|---|---|---|
| committer | seyko <seyko2@gmail.com> | 2016-04-13 07:05:38 +0300 |
| commit | 989b5ee8aee98b44377a3c82c5d65f54c0c6eb2f (patch) | |
| tree | e5ab40f64c98b4d7fb616985ffeb9eba35dff0b1 /tcc.h | |
| parent | a1a5c81e6cb0fe212774f85fc348da94435bb277 (diff) | |
| download | tinycc-989b5ee8aee98b44377a3c82c5d65f54c0c6eb2f.tar.gz tinycc-989b5ee8aee98b44377a3c82c5d65f54c0c6eb2f.tar.bz2 | |
Allow tcc arguments to be read from @listfiles
From: Vlad Vissoultchev
Date: Tue, 12 Apr 2016 20:43:15 +0300
Subject: Allow tcc arguments to be read from @listfiles
This allows all @ prefixed arguments to be treated as listfiles
containing list of source files or tcc options where each one is on a
separate line. Can be used to benchmark compilation speed with
non-trivial amount of source files.
The impl of `tcc_parse_args` had to be moved to a new function that is
able to be called recursively w/ the original one remaining as a driver
of the new one. Listfiles parsing happens in a new
`args_parser_add_listfile` function that uses `tcc_open`/`tcc_close/inp`
for buffered file input.
Diffstat (limited to 'tcc.h')
| -rw-r--r-- | tcc.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -627,6 +627,14 @@ struct sym_attr { #endif }; +typedef struct ParseArgsState +{ + int run; + int pthread; + int filetype; + CString linker_arg; /* collect -Wl options for input such as "-Wl,-rpath -Wl,<path>" */ +} ParseArgsState; + struct TCCState { int verbose; /* if true, display some information during compilation */ @@ -806,6 +814,7 @@ struct TCCState { int do_bench; /* option -bench */ int gen_deps; /* option -MD */ char *deps_outfile; /* option -MF */ + ParseArgsState *parse_args_state; }; /* The current value can be: */ |
