Le dimanche 6 août 2023 à 17:38, Sean Whitton <spwhit...@spwhitton.name> a écrit :

But the patch allows it to be done using an env var. There is no env var corresponding to the new Vnative_comp_jit_compilation. And the env var is needed so that we can be sure it's turned off early enough.

Exactly, so we can just add the envvar with the two-line patch that I sent :

diff --git a/lisp/startup.el b/lisp/startup.el
index d6e1c23fa28..3f89df0f119 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -595,6 +595,9 @@ It is the default value of the variable `top-level'."
     (setq user-emacs-directory
 	  (startup--xdg-or-homedot startup--xdg-config-home-emacs nil))
 
+    (setq native-comp-jit-compilation (getenv "DEBIAN_ENABLE_NATIVE_COMP_JIT"))
+    (setq native-comp-enable-subr-trampolines (getenv "DEBIAN_ENABLE_NATIVE_COMP_TRAMPOLINES"))
+
     (when (featurep 'native-compile)
       (unless (native-comp-available-p)
         ;; Disable deferred async compilation and trampoline synthesis

So, while it would be tidier to rework the patch to avoid introducing a
second variable, its functionality is still useful.

The only part of the patches that adds something that is not already there is the part that adds the envvar.

The useful functionality of these patches can therefore be entirely achieved with the two-line patch that I sent.

It is not only tidier, it is also equivalent in terms of functionality. We lose literally nothing in functionality, and we get a patch that much tidier, much simpler, and will be trivial to carry and rebase in the future versions.

Reply via email to