emacs-devel
[Top][All Lists]
Advanced

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

Re: [External] : emacs-28 windows binaries available from alpha


From: Andrea Corallo
Subject: Re: [External] : emacs-28 windows binaries available from alpha
Date: Thu, 10 Feb 2022 08:56:50 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <akrl@sdf.org>
>> Cc: dieter@duenenhof-wilhelm.de, corwin@bru.st, emacs-devel@gnu.org
>> Date: Wed, 09 Feb 2022 21:03:39 +0000
>> 
>> Wouldn't be better to call explicitly `native-comp-available-p' from
>> startup.el and set the two variables from there?
>
> Fine with me.  Could you suggest a good place for that call?

I'd propose the following patch:

>From 4bdbf3c76394e6d83f4a2bbb582ae0549674512c Mon Sep 17 00:00:00 2001
From: Andrea Corallo <akrl@sdf.org>
Date: Thu, 10 Feb 2022 09:46:31 +0100
Subject: [PATCH] * lisp/startup.el (normal-top-level): Disable native-comp if
 not available

---
 lisp/startup.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/startup.el b/lisp/startup.el
index 71e492e3b4..cccaa90e9c 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -537,6 +537,10 @@ normal-top-level
     (setq user-emacs-directory
          (startup--xdg-or-homedot startup--xdg-config-home-emacs nil))
 
+    (unless (native-comp-available-p)
+      (setq native-comp-deferred-compilation nil
+            comp-enable-subr-trampolines nil))
+
     (when (featurep 'native-compile)
       ;; Form `native-comp-eln-load-path'.
       (let ((path-env (getenv "EMACSNATIVELOADPATH")))
-- 
2.20.1

This way we set the two variables just before doing the
`native-comp-eln-load-path' job.  So essentially before the native
compiler is usable.

*Also* I'm now wondering if we shouldn't rename
 `comp-enable-subr-trampolines' into
 `native-comp-enable-subr-trampolines' (if it's not to late...)

> And I understand that you are suggesting that _in_addition_ to the
> patch I proposed, right?

I think my change should be sufficient, maybe you see a reason why we
should set these two every time we pass in `native-comp-available-p'?

Thanks

  Andrea

reply via email to

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