unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mikael Djurfeldt <mikael@djurfeldt.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Bootstrap optimization
Date: Sun, 28 Oct 2018 13:40:00 +0100	[thread overview]
Message-ID: <CAA2XvwJaMoxv652aGYGoK5FsBoDGZ1=3UnvK7CHo_OwoStCqJw@mail.gmail.com> (raw)
In-Reply-To: <CAA2XvwLMC_Ou8=7pxuYvoA9H5rotkG5uc0+P8XVC0TDdJkWpOQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 374 bytes --]

OK, here's a new patch. OK to apply it?

This actually also fixes the existing problem of all bootstrap objects
being rebuilt of eval.scm is touched.

The patch is verified to give a faster build for 4 and 32 build threads.

The only downside is that it requires GNU Make 3.8 (which was released
2002) or later, but that shouldn't be a problem, right?

Best regards,
Mikael

[-- Attachment #1.2: Type: text/html, Size: 525 bytes --]

[-- Attachment #2: 0001-Bootstrap-optimization.patch --]
[-- Type: text/x-patch, Size: 1131 bytes --]

From 332471874aa227e8b25b747f560ab9185af4f2fb Mon Sep 17 00:00:00 2001
From: Mikael Djurfeldt <mikael@djurfeldt.com>
Date: Thu, 25 Oct 2018 13:53:47 +0200
Subject: [PATCH] Bootstrap optimization

* bootstrap/Makefile.am: Build both eval.go and psyntax-pp.go before
  the rest of the .go files so that they are handled by a fast macro
  expander. This saves time for a parallel build.
---
 bootstrap/Makefile.am | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/bootstrap/Makefile.am b/bootstrap/Makefile.am
index 57b62eb56..bcb22cdbc 100644
--- a/bootstrap/Makefile.am
+++ b/bootstrap/Makefile.am
@@ -32,5 +32,9 @@ GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives
 include $(top_srcdir)/am/bootstrap.am
 
 # We must build the evaluator first, so that we can be sure to control
-# the stack.
-$(filter-out ice-9/eval.go, $(GOBJECTS)): ice-9/eval.go
+# the stack. Then, we build the syntax-case macro expander before the
+# rest, in order to speed up parallel builds.
+ice-9/psyntax-pp.go: | ice-9/eval.go
+
+$(filter-out ice-9/eval.go ice-9/psyntax-pp.go, $(GOBJECTS)): | \
+	ice-9/psyntax-pp.go
-- 
2.11.0


  reply	other threads:[~2018-10-28 12:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25 12:25 Bootstrap optimization Mikael Djurfeldt
2018-10-28  1:34 ` Mark H Weaver
2018-10-28  7:24   ` Mikael Djurfeldt
2018-10-28 12:40     ` Mikael Djurfeldt [this message]
2018-10-28 22:33       ` Officially require GNU Make to build Guile? (was Re: Bootstrap optimization) Mark H Weaver
2018-10-29  0:12         ` Greg Troxel
2018-10-29 10:33         ` Mikael Djurfeldt
2018-10-30  6:04           ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA2XvwJaMoxv652aGYGoK5FsBoDGZ1=3UnvK7CHo_OwoStCqJw@mail.gmail.com' \
    --to=mikael@djurfeldt.com \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).