unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: disable automatic native-compilation?
Date: Sat, 09 Jul 2022 09:49:59 -0700	[thread overview]
Message-ID: <86h73qi62w.fsf@stephe-leake.org> (raw)

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	other threads:[~2022-07-09 16:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-09 16:49 Stephen Leake [this message]
2022-07-09 17:23 ` disable automatic native-compilation? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86h73qi62w.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).