From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Speeding up the bootstrap build - a quick hack. Date: Tue, 18 Jan 2022 21:34:38 +0200 Message-ID: <83y23cu9bl.fsf@gnu.org> References: <83pmopunzl.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26758"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 18 20:46:56 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 1n9uRT-0006os-TK for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Jan 2022 20:46:56 +0100 Original-Received: from localhost ([::1]:46592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9uRS-0002MM-8z for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Jan 2022 14:46:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9uFj-0001bi-LR for emacs-devel@gnu.org; Tue, 18 Jan 2022 14:34:48 -0500 Original-Received: from [2001:470:142:3::e] (port=45678 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9uFi-0001Ix-GE; Tue, 18 Jan 2022 14:34:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QM+JwhixdY0s1cMrI0T3LW++rcNDaiJHDBcgX+gfo8w=; b=COcSLlNbexIb i4YWNewFXhXB3uHvXHK94A5owPr31tgHit0T8fJnX6eBHH05NEORY6KUGUKhm1csx/ftnmSxOG5rt B8O7aE+eMaApVebC+bJW1JGNK4OHmZqsyk/9Eth7T5TowZUXU2JxiiNhkq5EzUaT+7nrYnTnzf/nG YaBTwmUcSiLXi/g11aGx/8cZPRpftX4QqUH8wvOOTp3X0rQabYIvrQ3uinVEAUN6qlqf+JE3QVlPN qPo1A5Sb+Ot0WaooAUPjHLSBlTCH0eEFXeUIhbn7MlKf+XuaUmDH/CX4HbDWIEU9tnny/ceVkHoOG ypWFngIK9dcrMluaWWgw4g==; Original-Received: from [87.69.77.57] (port=3936 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9uFi-0006GH-1I; Tue, 18 Jan 2022 14:34:46 -0500 In-Reply-To: (message from Stefan Monnier on Tue, 18 Jan 2022 13:40:19 -0500) 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:284945 Archived-At: > 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.