From 13816f14b2f459a97d309f202f218282888e9bc9 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 11 Nov 2019 07:42:01 +0100 Subject: [PATCH] propagate compiler settings to the async workers --- lisp/emacs-lisp/comp.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index a31a82dd4f1..99243fda2c7 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -44,7 +44,7 @@ - 1 lite optimizations. - 2 heavy optimizations. - 3 max optimization level, to be used only when necessary. - The compiler can inline within the compilation unit..." + Warning: the compiler is free to perform dangerous optimizations." :type 'number :group 'comp) @@ -1778,8 +1778,12 @@ Prepare every function for final compilation and drive the C back-end." (while (setf f (with-mutex comp-src-pool-mutex (pop comp-src-pool))) (when (comp-to-file-p f) - (let* ((cmd (concat "emacs --batch --eval=" - "'(native-compile \"" f "\")'")) + (let* ((code `(let ((comp-speed ,comp-speed) + (comp-debug ,comp-debug) + (comp-verbose ,comp-verbose)) + (native-compile ,f))) + (cmd (concat "emacs --batch --eval='" + (prin1-to-string code) "'")) (prc (start-process-shell-command (concat "async compilation: " f) "async-compile-buffer" cmd))) -- 2.39.5