-
Notifications
You must be signed in to change notification settings - Fork 10
Build infrastructure for bootstrapping
When a new feature is added to maru, and we want to use that new feature in the code that is needed for compiling maru itself, then we need to use staging in the build process to introduce the new feature.
The basic idea is that the eval.exe yielded by building the stage-n
is used to build the stage-n+1
eval.exe, which will contain the new feature. This new feature then can be used freely from that point in the dependencies of eval.l and all the other compiling machinery.
Interesting stages are represented by consecutive stage-n
branches in the repo (but not all of them are necessarily needed for a pure C -> latest bootstrap cycle). Makefiles in any stage can chose which previous stage they check out into the build/ directory and use as a foundation to compile themselves.
There's a stage-1
branch to hold the original maru with all its eval1, eval2, eval3, and master
is where development continues, which will become stage-2
when a new feature needs to be bootstrapped.
There's a Makefile target that can check out a branch into the build/ dir and build it.