emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The emacs-28 release branch has been created


From: Andrea Corallo
Subject: Re: The emacs-28 release branch has been created
Date: Mon, 04 Oct 2021 19:40:50 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Andrea Corallo via "Emacs development discussions."
<emacs-devel@gnu.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Andrea Corallo <akrl@sdf.org>
>>> Cc: kbrown@cornell.edu, emacs-devel@gnu.org
>>> Date: Mon, 04 Oct 2021 16:15:35 +0000
>>> 
>>> Okay I see what's the issue.  In `comp-final' we spawn a child process
>>> to run the final pass or not discriminating on the `byte+native-compile'
>>> var.  This is wrong cause this is not bound when using
>>> `batch-native-compile'.
>>> 
>>> When spawning the sub-process we print the limple dump in a file and this
>>> gets in this case truncated (still to be understood why) leading to the
>>> error.
>>> 
>>> Will come with patch after dinner.
>>
>> Thanks.
>
> Attached.  Ok for emacs-28?

Attached for real...  Apologies

Andrea

>From d3f96619660000ff37663c8f9717ff2f620ab2a6 Mon Sep 17 00:00:00 2001
From: Andrea Corallo <akrl@sdf.org>
Date: Mon, 4 Oct 2021 21:15:02 +0200
Subject: [PATCH] * Fix `batch-native-compile' not to spawn a subprocess

* lisp/emacs-lisp/comp.el (comp-running-batch-compilation): New var.
(comp-final): Use it.
(batch-native-compile): Bind `comp-running-batch-compilation' it.
---
 lisp/emacs-lisp/comp.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 94753ec3d9..63d4a74b54 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3653,6 +3653,9 @@ comp-final1
 (defvar comp-async-compilation nil
   "Non-nil while executing an asynchronous native compilation.")
 
+(defvar comp-running-batch-compilation nil
+  "Non-nil when compilation is driven by any `batch-*-compile' function.")
+
 (defun comp-final (_)
   "Final pass driving the C back-end for code emission."
   (maphash #'comp-compute-function-type (comp-ctxt-funcs-h comp-ctxt))
@@ -3661,7 +3664,7 @@ comp-final
     ;; unless during bootstrap or async compilation (bug#45056).  GCC
     ;; leaks memory but also interfere with the ability of Emacs to
     ;; detect when a sub-process completes (TODO understand why).
-    (if (or byte+native-compile comp-async-compilation)
+    (if (or comp-running-batch-compilation comp-async-compilation)
        (comp-final1)
       ;; Call comp-final1 in a child process.
       (let* ((output (comp-ctxt-output comp-ctxt))
@@ -4202,9 +4205,10 @@ batch-native-compile
 will be placed under the native-lisp/ directory (actually, in the
 last directory in `native-comp-eln-load-path')."
   (comp-ensure-native-compiler)
-  (let ((native-compile-target-directory
-         (if for-tarball
-             (car (last native-comp-eln-load-path)))))
+  (let ((comp-running-batch-compilation t)
+        (native-compile-target-directory
+            (if for-tarball
+                (car (last native-comp-eln-load-path)))))
     (cl-loop for file in command-line-args-left
              if (or (null byte+native-compile)
                     (cl-notany (lambda (re) (string-match re file))
-- 
2.20.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]