summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-03-07 20:19:20 +0100
committerAndrea Corallo <akrl@sdf.org>2021-03-07 20:19:20 +0100
commitdbdc44db15ef9daa24d92c59d4e158f3963a172f (patch)
treecf48697f66299efc55f9eddf369b9597b31e38b6 /src
parent38b4ac3e6b5ac7e88003e02b30bbe2bdb82e6e6a (diff)
downloademacs-dbdc44db15ef9daa24d92c59d4e158f3963a172f.tar.gz
emacs-dbdc44db15ef9daa24d92c59d4e158f3963a172f.tar.bz2
emacs-dbdc44db15ef9daa24d92c59d4e158f3963a172f.zip
Allow for `comp-native-driver-options' to work as a file-local variable.
Diffstat (limited to 'src')
-rw-r--r--src/comp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/comp.c b/src/comp.c
index bea9945bbfe..b2d8b8ec987 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -516,6 +516,7 @@ typedef struct {
typedef struct {
EMACS_INT speed;
EMACS_INT debug;
+ Lisp_Object driver_options;
gcc_jit_context *ctxt;
gcc_jit_type *void_type;
gcc_jit_type *bool_type;
@@ -4333,7 +4334,7 @@ DEFUN ("comp-native-driver-options-effective-p",
static void
add_driver_options (void)
{
- Lisp_Object options = Fsymbol_value (Qcomp_native_driver_options);
+ Lisp_Object options = comp.driver_options;
#if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option) \
|| defined (WINDOWSNT)
@@ -4400,6 +4401,7 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file,
eassert (comp.speed < INT_MAX);
comp.debug = XFIXNUM (CALL1I (comp-ctxt-debug, Vcomp_ctxt));
eassert (comp.debug < INT_MAX);
+ comp.driver_options = CALL1I (comp-ctxt-driver-options, Vcomp_ctxt);
if (comp.debug)
gcc_jit_context_set_bool_option (comp.ctxt,