On 01/23/15 13:06, David Malcolm wrote:
libgccjit can print detailed logs and generate testcases for
reproducing bugs (using gcc_jit_context_set_logfile and
gcc_jit_context_dump_reproducer_to_file respectively).
It strikes me that such files really ought to contain version
information, so the following patch adds calls to print_version in both
places.
This requires touching toplev.c/h to add a flag to print_version, since
it accesses global variables. The relevant logging calls in libgccjit are
from regions that don't hold the mutex on gcc's state, and so we have to
skip logging those parts of the version info.
Passes "make check-jit".
OK for stage 4, assuming bootstrap®rtest?
gcc/ChangeLog:
* toplev.c (print_version): Add param "show_global_state", and
only print GGC and plugin information if it is true.
(init_asm_output): Pass in "true" for the new param when calling
print_version.
(process_options): Likewise.
(toplev::main): Likewise.
* toplev.h (print_version): Add new param to decl.
OK. It's a bit out of scope for stage4, but I'll gate it in.
jeff