Subject: bug#57627: 29.0.50; [native-compilation] cl-loaddefs.el recompiled on startup

From: Eli Zaretskii <[email-masked]>
Date: Wed, 07 Sep 2022 05:33:37 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked],
>   [email-masked]
> Date: Tue, 06 Sep 2022 22:40:47 +0200
> 
> And...  since the .eln file is never written, it'll fork these Emacsen
> every time you start Emacs?  That seems to be the case -- I get
> 
> Compiling /home/larsi/src/emacs/nativecomp/lisp/emacs-lisp/cl-loaddefs.el...
> 
> in the async buffer on every Emacs restart.

If you let it finish, i.e. wait until list-processes shows an empty
buffer, it won't start these compilations in the next invocations.  At
least that's what happens to me.

Btw, is that a GUI session or a -nw session?  I see this in a -nw
session, which I can explain: we load the terminal-specific file from
lisp/term/, and that requires compilation, so we load comp.el to start
compilation, and that then loads all the dependencies of comp.el and
compiles them, which of course includes cl-lib, cl-macs, cl-loaddefs,
etc.

In a GUI session I don't expect all this to happen, so if it does, we
should investigate why we load something at startup in that case.