Building GHC quickly

Simon Marlow simonmarhaskell at gmail.com
Tue Dec 5 04:23:35 EST 2006


Donald Bruce Stewart wrote:
> simonmarhaskell:
> 
>>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:
>>>   http://cgi.cse.unsw.edu.au/~dons/blog/2006/12/03#build_ghc_fast
>>
>>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.
> 
> 
> Yes!
> 
> 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.

Great - although with unoptimised libraries this build isn't really much use 
except as a sanity check.  How much extra time does it take if you optimise the 
libraries?

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

Nice :)  Hopefully we'll have BuildBot set up soon, so adding new nightly builds 
will be easy.

Cheers,
	Simon



More information about the Glasgow-haskell-users mailing list