bug#69314: [PATCH] Speed up stage0 bootstrap build using prebuilts

Jonas Hahnfeld via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <e7f92037a53e4e23d6ec42f473b71dd0e5fc835a.camel__48247.188904655$1720979837$gmane$org@hahnjo.de>
On Mon, 2024-05-06 at 21:12 +0200, Jonas Hahnfeld via Developers list
for Guile, the GNU extensibility library wrote:
> On Mon, 2024-05-06 at 11:34 +0200, Ludovic Courtès wrote:
> > Hi Jonas,
> > 
> > Jonas Hahnfeld <[email protected]> skribis:
> > 
> > > On Thu, 2024-01-04 at 11:57 +0100, Jonas Hahnfeld wrote:
> > > > From 95f15821c535537c7ad4fdae1988855314d56ece Mon Sep 17
> > > > 00:00:00 2001
> > > > From: Jonas Hahnfeld <[email protected]>
> > > > Date: Thu, 4 Jan 2024 11:44:55 +0100
> > > > Subject: [PATCH] Speed up stage0 bootstrap build using
> > > > prebuilts
> > > > 
> > > > Use prebuilt bytecode of ice-9/eval.go and others for all of
> > > > stage0,
> > > > it is optimized and evaluation is much faster. In my
> > > > environment,
> > > > this speeds up the build of guile-3.0.9 from around 29 minutes
> > > > to
> > > > only 19 minutes.
> > > > 
> > > > * meta/build-env.in: In stage0, prefer prebuilt bytecode over
> > > > just
> > > > compiled stage0 files.
> > > > ---
> > > >  meta/build-env.in | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/meta/build-env.in b/meta/build-env.in
> > > > index bdc88ded4..446a536af 100644
> > > > --- a/meta/build-env.in
> > > > +++ b/meta/build-env.in
> > > > @@ -58,7 +58,7 @@ then
> > > >      fi
> > > >      export GUILE_LOAD_PATH
> > > >      case "$GUILE_BOOTSTRAP_STAGE" in
> > > > -        stage0)
> > > > GUILE_LOAD_COMPILED_PATH="${top_builddir}/stage0:${top_srcdir}/
> > > > prebuilt/@SCM_PREBUILT_BINARIES@" ;;
> > > > +        stage0)
> > > > GUILE_LOAD_COMPILED_PATH="${top_srcdir}/prebuilt/@SCM_PREBUILT_
> > > > BINARIES@:${top_builddir}/stage0" ;;
> > 
> > I don’t understand why changing the order would make a difference.
> > Surely if .go files are available under prebuilt/, they’ll be
> > found,
> > even if that directory comes second?  Or am I missing something?
> 
> Yes, they are found but with lower priority. As I try to explain in
> the commit message (could be improved though), the same bytecode is
> also built during stage0, but without optimizations which makes the
> rest of stage0 awfully slow.

ping, does this explanation make sense?

Jonas
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQRiF4DLRvon1vw5biCcVOmY/6OEDwUCZpQRKgAKCRCcVOmY/6OE
DzZ0AP4yj3IrxlKDN1BIbV+SxnQ8dpoAVD7GeWlR+8a2ATyGfgD/eVp6gWQlkqRB
5y/Vj9ftPSljm9quS2hiiHu9WFI0hAw=
=uQiO
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.