emacs-devel
[Top][All Lists]
Advanced

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

Re: Speeding up the bootstrap build - a quick hack.


From: Alan Mackenzie
Subject: Re: Speeding up the bootstrap build - a quick hack.
Date: Wed, 19 Jan 2022 16:50:11 +0000

Hello, Eli.

On Wed, Jan 19, 2022 at 13:46:44 +0200, Eli Zaretskii wrote:
> > Date: Wed, 19 Jan 2022 11:10:32 +0000
> > Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
> > From: Alan Mackenzie <acm@muc.de>

> > > No, we need two consecutive shell commands under the same target: one
> > > with no-native-compile set, the other without it.

> > No, this would not work.  It is essential to have all seven compile-first
> > files byte compiled before we start native compiling any of them.  That
> > is what halves the time taken for the compile-to-native of comp.el.

> The following single command in src/Makefile.in

>       $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"

> compiles all of the seven dwarfs in one go, so I'm not sure what you
> mean by "would not work".  Please elaborate.

> > I don't think we can avoid two separate targets for each of these source
> > files.

> I don't think you understood my proposal, because this reason makes no
> sense to me.

You're right, I didn't.  Maybe I understand it now.

The idea is to leave lisp/Makefile.in unchanged, and make all the
alterations in src/Makefile.in.

The segment of code you cite above builds all of compile-first in one
invocation, so there's no need to worry about mixtures of interpreted
source and .elc.

So, we duplicate that bit of code, setting the Emacs variable
no-native-compile on the command line of the first occurrence.  This
will cause the byte compilation of all of compile-first.

After this bit of new code, we use 'touch' to set the date of these new
*.elc's back to the distant past.  This will ensure that these *.el's
get built again in the next step.

The second duplicate of the old bit of make code will build the .eln's,
using the ("very old") .elc's which are still available inside Emacs.
It should do this reasonably quickly, because it is using *.elc's.

Yes, I agree that this approach is more elegant and surely easier to
maintain than my original hack, if it can be made to work (which it
surely can).  I will look at this this evening.  Thanks for the
suggestion.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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