emacs-devel
[Top][All Lists]
Advanced

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

disable automatic native-compilation?


From: Stephen Leake
Subject: disable automatic native-compilation?
Date: Sat, 09 Jul 2022 09:49:59 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt)

I've just started using Emacs 28. I'm trying run the ada-mode test
suite, which lauches a new Emacs instance for each test.

Now that instance also starts a native-compile process, which slows
things down (a lot), and does not terminate cleanly when the Emacs
instance does at the end of the test. I'm on Windows, so this pops up a
dialog that I have to acknowledge eventually.

The elisp manual section on native compilation does not say how to
disable it. I managed to disable starting the native-compile process by:

(defun native-comp-available-p () nil)

That sometimes causes an error about "can't find libgccjit", which
aborts the test. I can't track down the specific cause of that error,
because even C-h f foo gives the "can't find libgccjit" error once it
happens.

I tried M-x apropos-variable native, which turned up some interesting
possibilities:

native-comp-deferred-compilation

The documentation for this variable says:
    "If non-nil compile loaded .elc files asynchronously."

what happens if this is nil? the files are compiled synchronously, or
not at all?

Setting that nil instead of redefining native-comp-available-p seems to
work.


So, I suggest:

- There should be a simple way to completely disable native compilation;
Emacs should never do anything that I can't control. If setting
native-comp-deferred-compilation nil is the right way to do this, it
should be documented in the native compilation section of the elisp
manual.

- When native-comp-available-p returns nil, there should be no errors
about libgccjit

-- 
-- Stephe



reply via email to

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