[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Speeding up the bootstrap build - a quick hack.
From: |
Stefan Monnier |
Subject: |
Re: Speeding up the bootstrap build - a quick hack. |
Date: |
Mon, 17 Jan 2022 15:55:26 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> The following may go some way to fixing this slowdown. Its idea is to
> build the lisp directory first by compiling the byte compiler and then
> using this to build the native compiler, rather than building the native
> compiler directly from interpreted list.
Thanks, that's pretty much what I suggested we should do (tho I wasn't
too sure *how* to do that ;-)
> This patch is at the stage of being a crude hack, and it has been tried
> only on GNU. It might work on other systems, though.
It looks pretty good and clean, actually.
I of course have some comments/questions:
> +COMPILE_ZEROTH = \
> + $(lisp)/emacs-lisp/macroexp.elc0 \
> + $(lisp)/emacs-lisp/cconv.elc0 \
> + $(lisp)/emacs-lisp/byte-opt.elc0 \
> + $(lisp)/emacs-lisp/bytecomp.elc0 \
> + $(lisp)/emacs-lisp/comp-cstr.elc0 \
> + $(lisp)/emacs-lisp/comp.elc0
> +
> COMPILE_FIRST = \
> $(lisp)/emacs-lisp/macroexp.elc \
> $(lisp)/emacs-lisp/cconv.elc \
Can't COMPILE_ZEROTH be made directly from COMPILE_FIRST so we don't
need to maintain two different lists?
> # An old-fashioned suffix rule, which, according to the GNU Make manual,
> # cannot have prerequisites.
> ifeq ($(HAVE_NATIVE_COMP),yes)
> -.el.elc:
> +.el.elc0:
> + $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
> + --exec "(setq load-suffixes '(\".elc0\" \".el\"))" \
> + -f batch-byte-compile $<
> + mv $<c $@
The indentation looks wrong here, tho maybe it's a question of taste
(or it's a problem in the TAB/SPC transfer through email).
> +%.elc : %.el $(COMPILE_ZEROTH)
> $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) \
> + --exec "(setq load-suffixes '(\".elc0\" \".elc\" \".el\"))" \
> -l comp -f batch-byte+native-compile $<
Shouldn't this list have `.elc` before `.elc0` so we use the
native-compiled compiler when available?
> -.PHONY: compile-first compile-main compile compile-always
> +.PHONY: compile-zeroth compile-first compile-main compile compile-always
>
> -compile-first: $(COMPILE_FIRST)
> +compile-zeroth: $(COMPILE_ZEROTH)
> +compile-first: compile-zeroth $(COMPILE_FIRST)
Is this necessary, or is it just helpful to debug the Makefile?
Stefan
- Speeding up the bootstrap build - a quick hack., Alan Mackenzie, 2022/01/17
- Re: Speeding up the bootstrap build - a quick hack.,
Stefan Monnier <=
- Re: Speeding up the bootstrap build - a quick hack., Alan Mackenzie, 2022/01/18
- Re: Speeding up the bootstrap build - a quick hack., Stefan Monnier, 2022/01/18
- Re: Speeding up the bootstrap build - a quick hack., Alan Mackenzie, 2022/01/18
- Re: Speeding up the bootstrap build - a quick hack., Stefan Monnier, 2022/01/18
- Re: Speeding up the bootstrap build - a quick hack., Alan Mackenzie, 2022/01/19
- Re: Speeding up the bootstrap build - a quick hack., Stefan Monnier, 2022/01/19
- Re: Speeding up the bootstrap build - a quick hack., Stefan Monnier, 2022/01/19
- Re: Speeding up the bootstrap build - a quick hack., Robert Pluim, 2022/01/18
- Re: Speeding up the bootstrap build - a quick hack., Alan Mackenzie, 2022/01/18
- Re: Speeding up the bootstrap build - a quick hack., Robert Pluim, 2022/01/18