From: Andrea Corallo Date: Wed, 19 Aug 2020 15:47:37 +0000 (+0200) Subject: * Improve 'add_driver_options' X-Git-Tag: emacs-28.0.90~2727^2~475^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1f105d5554e37a0c4994806a0f910c6686f2014d;p=emacs.git * Improve 'add_driver_options' * src/comp.c (add_driver_options): Use load_gccjit_if_necessary and FOR_EACH_TAIL + GNU style. --- diff --git a/src/comp.c b/src/comp.c index 03409cba0cd..6cde761f761 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4130,27 +4130,19 @@ add_driver_options (void) #if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option) \ || defined (WINDOWSNT) #pragma GCC diagnostic ignored "-Waddress" - if (gcc_jit_context_add_driver_option) - { - while (CONSP (options)) - { - gcc_jit_context_add_driver_option (comp.ctxt, - SSDATA (XCAR (options))); - options = XCDR (options); - } - - return; - } + load_gccjit_if_necessary (true); + FOR_EACH_TAIL (options) + gcc_jit_context_add_driver_option (comp.ctxt, + SSDATA (XCAR (options))); + return; #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.")); - } + xsignal1 (Qnative_compiler_error, + build_string ("Customizing native compiler options" + " via `comp-native-driver-options' is" + " only available on libgccjit version 9" + " and above.")); } static void