diff options
author | Andreas Fuchs <asf@boinkor.net> | 2020-08-19 08:16:50 -0400 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-08-26 21:25:45 +0200 |
commit | c00aedb4a591fc19818ad28846b7cf03c744a730 (patch) | |
tree | b2f9b5905ee1b58543de8bcf5ec02f38ab273ef6 /src/comp.c | |
parent | 2772e835b61774ca83cbd2bf79c2534b2d1c6f49 (diff) | |
download | emacs-c00aedb4a591fc19818ad28846b7cf03c744a730.tar.gz emacs-c00aedb4a591fc19818ad28846b7cf03c744a730.tar.bz2 emacs-c00aedb4a591fc19818ad28846b7cf03c744a730.zip |
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.
Diffstat (limited to 'src/comp.c')
-rw-r--r-- | src/comp.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/comp.c b/src/comp.c index 97a56658707..03409cba0cd 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 |