[Top][All Lists]

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

Re: Enabling native compilation by default when libgccjit is present

From: Eli Zaretskii
Subject: Re: Enabling native compilation by default when libgccjit is present
Date: Tue, 07 Dec 2021 15:59:31 +0200

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: emacs-devel@gnu.org
> Date: Tue, 07 Dec 2021 06:02:25 +0100
> Michael Heerdegen <michael_heerdegen@web.de> writes:
> > But don't you think these warnings should not be presented to the end
> > user who maybe doesn't know what these warnings mean?
> A different point is that some of my libraries seemingly stopped working
> due to native compilation.

Please report those cases as bugs.  They could be real bugs or they
could be something in your code that needs amendment, but please don't
leave them unreported, especially during the pretest -- that is what
the pretest is for.

> Are there additional requirements for the source files for native
> compilation?  Why do I get additional warnings (and even errors) at
> all?

You get additional warnings because each of the *.el files is compiled
in a separate Emacs process, which starts from a clean state.  By
contrast, it may be the case that your code says something like

  (require 'foo)
  (require 'bar)

and 'bar' uses some stuff in 'foo' under the assumption that 'foo' is
always loaded before 'bar'.  Since native-compilation will compile
'foo' and 'bar' separately, it will emit warnings.

The solution is either to fix such hidden dependencies, or (if you
have too many of those and cannot be bothered) avoid native-compiling
those files by placing the "no-native-compile: t" cookie in them.

reply via email to

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