]> git.eshelyaron.com Git - emacs.git/commitdiff
* Fix async native compilation (bug#58637)
authorAndrea Corallo <akrl@sdf.org>
Wed, 19 Oct 2022 20:08:41 +0000 (22:08 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 19 Oct 2022 20:21:03 +0000 (22:21 +0200)
* lisp/emacs-lisp/comp.el (comp--native-compile): Fix gate condition.
(comp-run-async-workers): Add assetion.

lisp/emacs-lisp/comp.el

index 2c9b79334bad222371c5d35e879407d0243b0011..5a05fe4854b6b3b616b0024fad85e1568b189c86 100644 (file)
@@ -3928,6 +3928,7 @@ processes from `comp-async-compilations'"
   "Start compiling files from `comp-files-queue' asynchronously.
 When compilation is finished, run `native-comp-async-all-done-hook' and
 display a message."
+  (cl-assert (null comp-no-spawn))
   (if (or comp-files-queue
           (> (comp-async-runnings) 0))
       (unless (>= (comp-async-runnings) (comp-effective-async-max-jobs))
@@ -4048,7 +4049,7 @@ the deferred compilation mechanism."
               (stringp function-or-file))
     (signal 'native-compiler-error
             (list "Not a function symbol or file" function-or-file)))
-  (unless comp-no-spawn
+  (when (or (null comp-no-spawn) comp-async-compilation)
     (catch 'no-native-compile
       (let* ((print-symbols-bare t)
              (data function-or-file)