Building GHC quickly

Donald Bruce Stewart dons at
Mon Dec 4 19:28:03 EST 2006

> Donald Bruce Stewart wrote:
> >Had a go today building GHC on a multcore linux box, with -j, just to
> >see how fast it would go. 
> >
> >Summary: you can build GHC from scratch in less than 10 minutes these days!
> >
> >More details here:
> >
> I'd be interested in how long it takes if you turn on -O for the stage 1 
> compiler only.  The point being that it'll be slower to compile stage 1, 
> but that compiler is then used to build all the libraries and stage 2, so 
> the benefit of having an optimised stage 1 might outweigh the time it takes 
> to build it.


7 mins 49 seconds, with:

    SRC_HC_OPTS     = -H64m -Onot -fasm
    GhcStage1HcOpts = -O -fasm
    GhcStage2HcOpts = -Onot -fasm
    GhcLibHcOpts    = -Onot -fasm
    GhcLibWays      =
    SplitObjs       = NO

and -j10, on a 4 core linux machine.

When the new 16 core box arrives, I'll set up a nightly build to ensure
the -jN building keeps working.

-- Don

More information about the Glasgow-haskell-users mailing list