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.
This commit is contained in:
Andreas Fuchs 2020-08-08 16:22:43 -04:00 committed by Andrea Corallo
parent 8a931a97b8
commit bec2adebc6
2 changed files with 38 additions and 0 deletions

View file

@ -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.")