[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 53ca0d9: Rework native compilation `comp-debug' (bug
From: |
Andrea Corallo |
Subject: |
feature/native-comp 53ca0d9: Rework native compilation `comp-debug' (bug#46495) |
Date: |
Wed, 31 Mar 2021 14:26:11 -0400 (EDT) |
branch: feature/native-comp
commit 53ca0d98441da75be49111a3a88c1a7629f27d6d
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
Rework native compilation `comp-debug' (bug#46495)
* lisp/emacs-lisp/comp.el (comp-debug): Update docstring and
move default on Windows systems from 0 to 1.
* src/comp.c (Fcomp__compile_ctxt_to_file): Tweak debug
levels.
---
lisp/emacs-lisp/comp.el | 12 ++++++------
src/comp.c | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 2f9738a..59e9dbc 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -56,14 +56,14 @@
:safe #'integerp
:version "28.1")
-(defcustom comp-debug 0
+(defcustom comp-debug (if (eq 'windows-nt system-type) 1 0)
"Debug level for native compilation, a number between 0 and 3.
This is intended for debugging the compiler itself.
- 0 no debugging output.
- This is the recommended value unless you are debugging the compiler itself.
- 1 emit debug symbols and dump pseudo C code.
- 2 dump gcc passes.
- 3 dump libgccjit log file."
+ 0 no debug output.
+ 1 emit debug symbols.
+ 2 emit debug symbols and dump pseudo C code.
+ 3 emit debug symbols and dump: pseudo C code, GCC intermediate
+ passes and libgccjit log file."
:type 'integer
:safe #'natnump
:version "28.1")
diff --git a/src/comp.c b/src/comp.c
index b286f60..a87a8f3 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4431,7 +4431,7 @@ DEFUN ("comp--compile-ctxt-to-file",
Fcomp__compile_ctxt_to_file,
gcc_jit_context_set_bool_option (comp.ctxt,
GCC_JIT_BOOL_OPTION_DEBUGINFO,
1);
- if (comp.debug > 2)
+ if (comp.debug >= 3)
{
logfile = emacs_fopen ("libgccjit.log", "w");
gcc_jit_context_set_logfile (comp.ctxt,
@@ -4493,7 +4493,7 @@ DEFUN ("comp--compile-ctxt-to-file",
Fcomp__compile_ctxt_to_file,
add_driver_options ();
- if (comp.debug)
+ if (comp.debug >= 1)
gcc_jit_context_dump_to_file (comp.ctxt,
format_string ("%s.c", SSDATA (ebase_name)),
1);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/native-comp 53ca0d9: Rework native compilation `comp-debug' (bug#46495),
Andrea Corallo <=