Shaking up GHC
As part of my 6-month research secondment to Microsoft Research in Cambridge
I am taking up the challenge of migrating the current GHC build system
based on standard make
into a new and (hopefully) better one based on
Shake. If you are curious about the project you can find more details
on the wiki page and in this blog post.
This is supposed to go into the shake-build
directory of the GHC source tree.
Trying it
Linux
git clone git://git.haskell.org/ghc
cd ghc
git submodule update --init
git clone git://github.com/snowleopard/shaking-up-ghc shake-build
./boot
./configure
Now you have a couple of options:
./shake-build/build.sh
to run the script directly. You'll need to haveshake
installed globally../shake-build/build.cabal.sh
to install the build system in a Cabal sandbox and then run it.
Windows
$ git clone --recursive git://git.haskell.org/ghc.git
$ cd ghc
$ git clone git://github.com/snowleopard/shaking-up-ghc shake-build
$ ./boot
$ ./configure --enable-tarballs-autodownload
$ shake-build/build.bat
Also see the Building GHC on Windows guide.
Resetting the build
To reset the new build system run the build script with -B
flag. This will force Shake to rerun all rules, even if the results of the previous build are still in the GHC tree. This is a temporary solution; we are working on a proper reset functionality (see #32).
How to contribute
The best way to contribute is to try the new build system, report the issues you found, and attempt to fix them. Please note the codebase is very unstable at present and we expect a lot of further refactoring. Before attempting to fix any issue do make sure no one else is already working on it. The documentation is currently non-existent, but we will start addressing this once the codebase stabilises.