From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Speeding up the bootstrap build - a quick hack. Date: Tue, 18 Jan 2022 20:35:02 +0000 Message-ID: References: <83pmopunzl.fsf@gnu.org> <83y23cu9bl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39317"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 18 21:36:38 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9vDa-000A2I-CT for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Jan 2022 21:36:38 +0100 Original-Received: from localhost ([::1]:50262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9vDY-0003y4-Te for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Jan 2022 15:36:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9vC7-000378-Pl for emacs-devel@gnu.org; Tue, 18 Jan 2022 15:35:07 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:33562 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1n9vC5-0002jv-Ln for emacs-devel@gnu.org; Tue, 18 Jan 2022 15:35:07 -0500 Original-Received: (qmail 66773 invoked by uid 3782); 18 Jan 2022 20:35:03 -0000 Original-Received: from acm.muc.de (p4fe158ed.dip0.t-ipconnect.de [79.225.88.237]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 18 Jan 2022 21:35:03 +0100 Original-Received: (qmail 22645 invoked by uid 1000); 18 Jan 2022 20:35:02 -0000 Content-Disposition: inline In-Reply-To: <83y23cu9bl.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284950 Archived-At: Hello, Eli. On Tue, Jan 18, 2022 at 21:34:38 +0200, Eli Zaretskii wrote: > > From: Stefan Monnier > > Cc: Alan Mackenzie , emacs-devel@gnu.org > > Date: Tue, 18 Jan 2022 13:40:19 -0500 > > > 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? > > Yes. > > > 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. > > But we also want to native-compile those files (after we've > > byte-compiled them), so we do need two different targets. > No, we need two consecutive shell commands under the same target: one > with no-native-compile set, the other without it. > This is the current recipe: > ifeq ($(DUMPING),pdumper) > $(bootstrap_pdmp): bootstrap-emacs$(EXEEXT) > rm -f $@ > $(RUN_TEMACS) --batch $(BUILD_DETAILS) -l loadup --temacs=pbootstrap \ > --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR) > @: Compile some files earlier to speed up further compilation. > $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" > endif > What I had in mind is to run the last "$(MAKE) -C ../lisp compile-first" > line so that it binds no-native-compile to non-nil, and then is to run > it again without binding that variable, after touch'ing the corresponding > *.el files to force the recompile. > > Those should ideally be `.elc` first and `.eln` later, but we currently > > don't know how to make that work, so Alan suggests to use `.elc0` first > > and `.elc` later. > I know. This little project started off life quite simple, but has turned unbelievably complicated in the last few hours. I'll have a look at what you're written above tomorrow, in the hope that it will simplify the recipe I've got at the moment. But the main thing is that it _is_ possible to reduce how long a native compilation build takes. Reducing the compilation time of comp.el from 2min 30sec to 1min 20sec I think is worthwhile. -- Alan Mackenzie (Nuremberg, Germany).