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: Wed, 19 Jan 2022 11:10:32 +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="20344"; 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 Wed Jan 19 12:13:44 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 1nA8uO-00055X-4Z for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Jan 2022 12:13:44 +0100 Original-Received: from localhost ([::1]:54310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nA8uM-0004ab-NM for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Jan 2022 06:13:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nA8rQ-0002th-SZ for emacs-devel@gnu.org; Wed, 19 Jan 2022 06:10:40 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:57080 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1nA8rO-0006r5-Ts for emacs-devel@gnu.org; Wed, 19 Jan 2022 06:10:40 -0500 Original-Received: (qmail 83275 invoked by uid 3782); 19 Jan 2022 11:10:33 -0000 Original-Received: from acm.muc.de (p4fe15af9.dip0.t-ipconnect.de [79.225.90.249]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 19 Jan 2022 12:10:32 +0100 Original-Received: (qmail 3145 invoked by uid 1000); 19 Jan 2022 11:10:32 -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=ham 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:284970 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. 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. I don't think we can avoid two separate targets for each of these source files. > 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. -- Alan Mackenzie (Nuremberg, Germany).