Build GHC on Windows using Hadrian and Stack

Andrey Mokhov andrey.mokhov at
Fri Sep 2 02:45:58 UTC 2016

Hi all,

Summary: Building GHC on Windows using Hadrian and Stack got even simpler - see

To build GHC on Windows you usually need to jump through a lot of hoops [1], which may be confusing even for experienced GHC developers [2].

Hadrian to the rescue!

Hadrian, a new build system for GHC that I've been developing [3], is written in Haskell and can therefore be built and run via Stack that can install appropriate bootstrapping GHC and MSYS2 environment in an automated and robust way. This was first pointed out by Neil Mitchell [4], and I've recently simplified build instructions even further. Here are all the steps:

git clone --recursive git://
cd ghc
git clone git://
cd hadrian
stack setup
stack exec -- pacman -S autoconf automake-wrapper make patch tar --noconfirm
stack build
stack exec hadrian -- --directory ".." -j --flavour=quickest

See more details here:

NB: Hadrian can build Stage2 GHC, but there are still many limitations [5]. Help make it better!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list