diff options
| author | Andrea Corallo | 2019-06-13 00:36:01 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:41 +0100 |
| commit | f3fd0293d9112e5e1ad9ad3bfb1e982dcb0d032b (patch) | |
| tree | c611174b2cb299bcb7b63a305d8fd539446e9c3a /src/comp.c | |
| parent | d6ab30499153b2d6b9565039714f210930a10f65 (diff) | |
| download | emacs-f3fd0293d9112e5e1ad9ad3bfb1e982dcb0d032b.tar.gz emacs-f3fd0293d9112e5e1ad9ad3bfb1e982dcb0d032b.zip | |
make some order into debug facilities
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/comp.c b/src/comp.c index 3c837555d74..79aa0bdc031 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -1812,8 +1812,24 @@ init_comp (void) | |||
| 1812 | { | 1812 | { |
| 1813 | comp.ctxt = gcc_jit_context_acquire(); | 1813 | comp.ctxt = gcc_jit_context_acquire(); |
| 1814 | 1814 | ||
| 1815 | if (COMP_DEBUG) | ||
| 1816 | { | ||
| 1817 | logfile = fopen ("libgccjit.log", "w"); | ||
| 1818 | gcc_jit_context_set_logfile (comp.ctxt, | ||
| 1819 | logfile, | ||
| 1820 | 0, 0); | ||
| 1821 | gcc_jit_context_set_bool_option (comp.ctxt, | ||
| 1822 | GCC_JIT_BOOL_OPTION_DUMP_EVERYTHING, | ||
| 1823 | 1); | ||
| 1824 | gcc_jit_context_set_bool_option (comp.ctxt, | ||
| 1825 | GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES, | ||
| 1826 | 1); | ||
| 1827 | } | ||
| 1815 | if (COMP_DEBUG > 1) | 1828 | if (COMP_DEBUG > 1) |
| 1816 | gcc_jit_context_dump_reproducer_to_file (comp.ctxt, "comp_reproducer.c"); | 1829 | { |
| 1830 | gcc_jit_context_dump_reproducer_to_file (comp.ctxt, "comp_reproducer.c"); | ||
| 1831 | gcc_jit_context_dump_to_file (comp.ctxt, "emacs-gcc-code.c", 0); | ||
| 1832 | } | ||
| 1817 | 1833 | ||
| 1818 | comp.void_type = gcc_jit_context_get_type (comp.ctxt, GCC_JIT_TYPE_VOID); | 1834 | comp.void_type = gcc_jit_context_get_type (comp.ctxt, GCC_JIT_TYPE_VOID); |
| 1819 | comp.void_ptr_type = | 1835 | comp.void_ptr_type = |
| @@ -1931,20 +1947,6 @@ init_comp (void) | |||
| 1931 | NULL); | 1947 | NULL); |
| 1932 | 1948 | ||
| 1933 | comp.func_hash = CALLN (Fmake_hash_table, QCtest, Qequal, QCweakness, Qt); | 1949 | comp.func_hash = CALLN (Fmake_hash_table, QCtest, Qequal, QCweakness, Qt); |
| 1934 | |||
| 1935 | if (COMP_DEBUG) { | ||
| 1936 | logfile = fopen ("libgccjit.log", "w"); | ||
| 1937 | gcc_jit_context_set_logfile (comp.ctxt, | ||
| 1938 | logfile, | ||
| 1939 | 0, 0); | ||
| 1940 | gcc_jit_context_set_bool_option (comp.ctxt, | ||
| 1941 | GCC_JIT_BOOL_OPTION_DUMP_EVERYTHING, | ||
| 1942 | 1); | ||
| 1943 | } | ||
| 1944 | |||
| 1945 | gcc_jit_context_set_bool_option (comp.ctxt, | ||
| 1946 | GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES, | ||
| 1947 | 1); | ||
| 1948 | } | 1950 | } |
| 1949 | 1951 | ||
| 1950 | void | 1952 | void |