|Version 16 (modified by simonmar, 4 years ago) (diff)|
How do I rebuild GHC after updating or changing it?
To pull new changes, use the sync-all script.
After pulling changes, the following sequence should be enough to update your build:
$ perl boot $ ./configure $ make
Don't forget to add any necessary flags to ./configure if you need them.
If you're hacking on GHC, see Developing in a GHC build tree for ways of only rebuilding parts of GHC. In particular, running make 2 in the compiler or ghc directory is quite handy.
Things that might go wrong
- If you add or remove modules from GHC, make sure you edit ghc.cabal.in; see Commentary/SourceTree
- When files move around in the tree, this procedure will leave old files lying around. The build system typically won't know how to clean up the old files. Usually they won't cause a problem, but in the event that they do it's easy enough to wipe your build tree and start afresh, especially if you use a separate build tree.