POV-Ray : Newsgroups : povray.off-topic : Open source : Compiler compilation Server Time
6 Sep 2024 11:17:25 EDT (-0400)
  Compiler compilation  
From: Orchid XP v8
Date: 15 Feb 2009 08:19:34
Message: <49981666$1@news.povray.org>
Orchid XP v8 wrote:

> Anyway, I just made the mistake of running the compiler validation 
> script. The first thing this does is... clean the build tree. That is, 
> it deletes everything and recompiles from scratch. I guess the idea is 
> if you're been working on the compiler all day and you think it should 
> work now, it does a full rebuild from scratch to check it really *does* 
> work and it's not just that you're using an old result.
> 
> Rebuild started at 10:30 AM. We'll see how long it takes to rebuild. :-/

10:30 Started the validate process.
       Delete everything except the source code.
       Compile the stage-1 compiler using the stage-0 compiler.
11:00 Stage-1 compiler is ready.
       Compile all the Haskell standard libraries using stage-1 compiler.
11:30 Standard libraries are ready.
       Compile the stage-2 compiler using the stage-1 compiler.
12:00 Stage-2 compiler is ready.
       Compile the doc-gen program.
       Generate the HTML documentation.
12:15 Start running compiler test suite.
12:50 All tests completed successfully.

NB:

* The stage-0 compiler is the binary package that the Linux package 
manager installed. (GHC 6.8.2, as it happens.) The version I'm compiling 
is 6.11.20080214.

* The stage-1 compiler is linked against the stage-0 Haskell standard 
libraries. Then we recompile all the libraries using the new stage-1 
compiler. Last we recompile the compiler itself, linking against the new 
libraries we just built (i.e., we make stage-2).

* When I did a "normal" build yesterday, it made 2 copies of every 
Haskell library - a normal copy, and a copy with profiling enabled. 
(Enabling profiling makes the compiled stuff 2x bigger and 12x slower.) 
The validation build didn't bother with the profiling step, making the 
process about twice as fast.

* Curiosly, the normal build seemed to build a version of the compiler 
with profiling enabled - I'm not sure why the hell it would do that, but 
still. The validation build didn't seem to bother.

* The normal build also generated the HTML documentation for the 
compiler itself. This validation build has built the library 
documentation and the GHC API documentation, but not the user guide. 
(The user guide is quite fast though; just translate DocBook to HTML.)

I love the way that every now and then, you see a command line that 
starts with "ld" or "ar" and goes on for 3 pages. o_O Pretty crazy! Well 
anyway, after half an hour of compiling the compiler itself, the 
resulting binary is about 30 MB. (The stage-1 compiler is smaller, but 
then it does have several features disabled.)

Now, do I dare run the benchmark?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.