On Wed, Jul 25, 2012 at 06:39:03PM +0100, Lars Wirzenius wrote:
Erm, sorry. That's a bit of a scratch pad I use for collecting snippets
of stuff that will later be put into proper documentation, and it's not
public. Sorry. Here's the text I wrote:
-- 8< --
Many programming language implementations are written in that same
language. This creates a bootstrapping problem: how do we
build the compiler or interpreter so we can run it to build itself.
Usually, each language implementation provides a way to do the
bootstrap. For example, the Vala implementation compiles to C (rather
than executable code), and provides the generated C files, which can
then be built into a native executable. Often this is only done for
releases: the generated files are included in the release tar file,
but not in the version control system.
Since Baserock builds from the version control system, this creates
an extra step for us. The general principle for us to solve this is
as follows:
* we create a `baserock/bootstrap` branch in our git repository,
which has all the generated source code, and can be built with
just the usual devel stratum
* during the Baserock bootstrap build, we build from `baserock/bootstrap`
until pass 2, and can thus create a working (if unclean) version
of the language implementation
* in the devel stratum, we build from the normal branch (no generated
files), but this works because we already have a working compiler
Every language implementation is different, however, and needs to be
considered separately.
-- 8< --
Again, sorry.
--
http://www.codethink.co.uk/