diff options
| author | seyko <seyko2@gmail.com> | 2015-03-03 14:25:57 +0300 |
|---|---|---|
| committer | seyko <seyko2@gmail.com> | 2015-03-03 14:25:57 +0300 |
| commit | b7b9f9f51170bd1616ee56acfef9c6bf20b9cf3f (patch) | |
| tree | b31eb010c27630fdc5eeb8cd9b8c9c1548b3153f /tcc.c | |
| parent | 50cdccf3efaa13dd11d1533b73fb34e0429d5cd6 (diff) | |
| download | tinycc-b7b9f9f51170bd1616ee56acfef9c6bf20b9cf3f.tar.gz tinycc-b7b9f9f51170bd1616ee56acfef9c6bf20b9cf3f.tar.bz2 | |
A gcc preprocessor option -dD added
With this option on a defines are included into the output
(inside comments). This will allow to debug a problems like:
In file included from math.c:8:
In file included from /usr/include/math.h:43:
/usr/include/bits/nan.h:52: warning: NAN redefined
Diffstat (limited to 'tcc.c')
| -rw-r--r-- | tcc.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -47,6 +47,7 @@ static void help(void) " -Usym undefine 'sym'\n" " -P do not output a #line directive\n" " -P1 use a #line directive in output instead of the gcc style\n" + " -dD put a define directive in the output (inside a comment)\n" "Linker options:\n" " -Ldir add library path 'dir'\n" " -llib link with dynamic or static library 'lib'\n" @@ -307,6 +308,8 @@ int main(int argc, char **argv) start_time = getclock_us(); tcc_set_output_type(s, s->output_type); + if (s->output_type == TCC_OUTPUT_PREPROCESS) + print_defines(); /* compile or add each files or library */ for(i = ret = 0; i < s->nb_files && ret == 0; i++) { |
