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: Eli Zaretskii
Subject: Re: Speeding up the bootstrap build - a quick hack.
Date: Tue, 18 Jan 2022 16:17:50 +0200

> Date: Mon, 17 Jan 2022 20:26:08 +0000
> From: Alan Mackenzie <acm@muc.de>
> 
> diff --git a/lisp/Makefile.in b/lisp/Makefile.in
> index 3a72034463..b81337d2f3 100644
> --- a/lisp/Makefile.in
> +++ b/lisp/Makefile.in
> @@ -85,6 +85,14 @@ BYTE_COMPILE_FLAGS =
>  # the compiler (so its compilation does not speed up subsequent 
> compilations),
>  # it's only placed here so as to speed up generation of the loaddefs.el file.
>  
> +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    \
> @@ -298,22 +306,30 @@ $(THEFILE)n:
>  # subdirectories, to make sure require's and load's in the files being
>  # compiled find the right files.
>  
> -.SUFFIXES: .elc .el
> +.SUFFIXES: .elc0 .elc .el
>  
>  # 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 $@
> +
> +%.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 $<
>  else
>  .el.elc:
>       $(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $<
>  endif

Is this .elc0 trick just to avoid the ELC+ELN compilation of
COMPILE_FIRST, and instead first compile them only to .elc and then
compile again to .elc + .eln?

If so, why not use no-native-compile to disable the ELN part?  Since
compile-first is called from src/Makefile, as part of building
bootstrap-emacs, you can do that in the commands there.

If you tried that and it didn't work, can you tell me what I missed?

Thanks.



reply via email to

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