summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/comp.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-05-18 20:45:29 +0100
committerAndrea Corallo <akrl@sdf.org>2020-05-18 21:04:36 +0100
commit2ac619458520f1399088740e5e13751d362e55a0 (patch)
tree1b69979065d7e6ffed17f5e464a8e5eb696f90d1 /lisp/emacs-lisp/comp.el
parent6d850b50c536d558252017d4daea5d5718dcc8b2 (diff)
downloademacs-2ac619458520f1399088740e5e13751d362e55a0.tar.gz
emacs-2ac619458520f1399088740e5e13751d362e55a0.tar.bz2
emacs-2ac619458520f1399088740e5e13751d362e55a0.zip
* Add new customize `comp-async-env-modifier-form' (Bug#40838)
* lisp/emacs-lisp/comp.el (comp-async-env-modifier-form): New customize. (comp-run-async-workers): Make use of `comp-async-env-modifier-form'.
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r--lisp/emacs-lisp/comp.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index cd1e4dbd92e..f23a0b29afc 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -133,6 +133,12 @@ finishes compiling all input files."
:type 'hook
:group 'comp)
+(defcustom comp-async-env-modifier-form nil
+ "Form to be evaluated by each asyncronous compilation worker
+before compilation. Usable to modify the compiler environment."
+ :type 'list
+ :group 'comp)
+
(defvar comp-dry-run nil
"When non nil run everything but the C back-end.")
@@ -2324,6 +2330,7 @@ display a message."
comp-debug ,comp-debug
comp-verbose ,comp-verbose
load-path ',load-path)
+ ,comp-async-env-modifier-form
(message "Compiling %s..." ,source-file)
(native-compile ,source-file ,(and load t))))
(source-file1 source-file) ;; Make the closure works :/