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
This commit is contained in:
3
tcc.c
3
tcc.c
@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user