unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* disable automatic native-compilation?
@ 2022-07-09 16:49 Stephen Leake
  2022-07-09 17:23 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Stephen Leake @ 2022-07-09 16:49 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-08-06 15:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-09 16:49 disable automatic native-compilation? Stephen Leake
2022-07-09 17:23 ` Eli Zaretskii
2022-07-10 15:10   ` Lynn Winebarger
2022-07-10 15:39     ` Eli Zaretskii
2022-07-10 18:32       ` Lynn Winebarger
2022-07-10 21:54         ` Ken Brown
2022-07-11  1:52           ` Ken Brown
2022-07-11  2:39             ` Lynn Winebarger
2022-07-11 13:37               ` Ken Brown
2022-07-11 13:56                 ` Eli Zaretskii
2022-07-11 17:19                   ` Ken Brown
2022-07-09 22:36 ` Tor Kringeland
2022-07-10  8:58   ` Philip Kaludercic
2022-07-11 12:54   ` Andrea Corallo
2022-07-12 11:04     ` Tor Kringeland
2022-07-12 11:27       ` Tor Kringeland
2022-07-12 13:29         ` Eli Zaretskii
2022-08-06 15:32 ` Lynn Winebarger

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).