diff options
| author | Andreas Fuchs | 2020-08-19 08:16:50 -0400 |
|---|---|---|
| committer | Andrea Corallo | 2020-08-26 21:25:45 +0200 |
| commit | c00aedb4a591fc19818ad28846b7cf03c744a730 (patch) | |
| tree | b2f9b5905ee1b58543de8bcf5ec02f38ab273ef6 /src | |
| parent | 2772e835b61774ca83cbd2bf79c2534b2d1c6f49 (diff) | |
| download | emacs-c00aedb4a591fc19818ad28846b7cf03c744a730.tar.gz 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')
| -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, | |||
| 4123 | } | 4123 | } |
| 4124 | 4124 | ||
| 4125 | static void | 4125 | static void |
| 4126 | add_driver_options () | 4126 | add_driver_options (void) |
| 4127 | { | 4127 | { |
| 4128 | Lisp_Object options = Fsymbol_value (Qcomp_native_driver_options); | 4128 | Lisp_Object options = Fsymbol_value (Qcomp_native_driver_options); |
| 4129 | 4129 | ||
| 4130 | #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option | 4130 | #if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option) \ |
| 4131 | while (CONSP (options)) | 4131 | || defined (WINDOWSNT) |
| 4132 | #pragma GCC diagnostic ignored "-Waddress" | ||
| 4133 | if (gcc_jit_context_add_driver_option) | ||
| 4132 | { | 4134 | { |
| 4133 | gcc_jit_context_add_driver_option (comp.ctxt, SSDATA (XCAR (options))); | 4135 | while (CONSP (options)) |
| 4134 | options = XCDR (options); | 4136 | { |
| 4137 | gcc_jit_context_add_driver_option (comp.ctxt, | ||
| 4138 | SSDATA (XCAR (options))); | ||
| 4139 | options = XCDR (options); | ||
| 4140 | } | ||
| 4141 | |||
| 4142 | return; | ||
| 4135 | } | 4143 | } |
| 4136 | #else | 4144 | #pragma GCC diagnostic pop |
| 4145 | #endif | ||
| 4137 | if (CONSP (options)) | 4146 | if (CONSP (options)) |
| 4138 | { | 4147 | { |
| 4139 | xsignal1 (Qnative_compiler_error, | 4148 | xsignal1 (Qnative_compiler_error, |
| 4140 | build_string ("Customizing native compiler options via `comp-native-driver-options' is only available on libgccjit version 9 and above.")); | 4149 | build_string ("Customizing native compiler options" |
| 4150 | " via `comp-native-driver-options' is" | ||
| 4151 | " only available on libgccjit version 9" | ||
| 4152 | " and above.")); | ||
| 4141 | } | 4153 | } |
| 4142 | #endif | ||
| 4143 | } | 4154 | } |
| 4144 | 4155 | ||
| 4145 | static void | 4156 | static void |