[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp c00aedb 2/8: Fix windows NT handling for [...]_add_d
From: |
Andrea Corallo |
Subject: |
feature/native-comp c00aedb 2/8: Fix windows NT handling for [...]_add_driver_options |
Date: |
Wed, 26 Aug 2020 15:49:57 -0400 (EDT) |
branch: feature/native-comp
commit c00aedb4a591fc19818ad28846b7cf03c744a730
Author: Andreas Fuchs <asf@boinkor.net>
Commit: Andrea Corallo <akrl@sdf.org>
Fix windows NT handling for [...]_add_driver_options
* Instead of conditionalizing on the wrong preprocessor flag, now use
the right one: LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option
* Also perform the driver-option-adding step on win NT, but only if
the function is non-NULL.
* Make the function declaration for add_driver_options non-old-style.
---
src/comp.c | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/comp.c b/src/comp.c
index 97a5665..03409cb 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4123,23 +4123,34 @@ DEFUN ("comp--release-ctxt", Fcomp__release_ctxt,
Scomp__release_ctxt,
}
static void
-add_driver_options ()
+add_driver_options (void)
{
Lisp_Object options = Fsymbol_value (Qcomp_native_driver_options);
-#ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option
- while (CONSP (options))
+#if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option) \
+ || defined (WINDOWSNT)
+#pragma GCC diagnostic ignored "-Waddress"
+ if (gcc_jit_context_add_driver_option)
{
- gcc_jit_context_add_driver_option (comp.ctxt, SSDATA (XCAR (options)));
- options = XCDR (options);
+ while (CONSP (options))
+ {
+ gcc_jit_context_add_driver_option (comp.ctxt,
+ SSDATA (XCAR (options)));
+ options = XCDR (options);
+ }
+
+ return;
}
-#else
+#pragma GCC diagnostic pop
+#endif
if (CONSP (options))
{
xsignal1 (Qnative_compiler_error,
- build_string ("Customizing native compiler options via
`comp-native-driver-options' is only available on libgccjit version 9 and
above."));
+ build_string ("Customizing native compiler options"
+ " via `comp-native-driver-options' is"
+ " only available on libgccjit version 9"
+ " and above."));
}
-#endif
}
static void
- feature/native-comp updated (337367a -> aa526c9), Andrea Corallo, 2020/08/26
- feature/native-comp c00aedb 2/8: Fix windows NT handling for [...]_add_driver_options,
Andrea Corallo <=
- feature/native-comp 51acfee 7/8: * Init gcc_jit_context_add_driver_option as optional, Andrea Corallo, 2020/08/26
- feature/native-comp 1f105d5 3/8: * Improve 'add_driver_options', Andrea Corallo, 2020/08/26
- feature/native-comp f8321f0 5/8: * src/comp.c (add_driver_options): Fix missing condition + clean-up pragma, Andrea Corallo, 2020/08/26
- feature/native-comp 2772e83 1/8: Set native driver options in async compiles, also, Andrea Corallo, 2020/08/26
- feature/native-comp c17013a 4/8: * Add 'comp-native-driver-options-available-p', Andrea Corallo, 2020/08/26
- feature/native-comp 63f041c 6/8: * Rename comp-native-driver-options-available-p, Andrea Corallo, 2020/08/26
- feature/native-comp aa526c9 8/8: Merge branch 'add_driver_option' into HEAD, Andrea Corallo, 2020/08/26