From bec2adebc6a5c4984d52ea7e66a7a3632e7dc578 Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Sat, 8 Aug 2020 16:22:43 -0400 Subject: Pass driver options to libgccjit where supported Add a customizable variable for driver options (such as linker flags) to pass to libgccjit (Bug #42761). * lisp/emacs-lisp/comp.el (comp-native-driver-options): New customization variable. * src/comp.c: Use comp-native-driver-options to set libgccjit's driver options, if supported on the library's ABI version. --- lisp/emacs-lisp/comp.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 3176351b37d..37559c20dd4 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -134,6 +134,16 @@ before compilation. Usable to modify the compiler environment." :type 'list :group 'comp) +(defcustom comp-native-driver-options nil + "Options passed verbatim to the native compiler's backend driver. +Note that not all options are meaningful; typically only the options +affecting the assembler and linker are likely to be useful. + +Passing these options is only available in libgccjit version 9 +and above." + :type 'list + :group 'comp) + (defvar comp-dry-run nil "When non nil run everything but the C back-end.") -- cgit v1.2.3