Building and Porting GHC
This Guide is primarily aimed at those who want to build and/or hack on GHC. It describes how to get started with building GHC on your machine, and how to tweak the settings to get the kind of build you want. It also describes the inner workings of the build system, so you can extend it, modify it, and use it to build your code.
Contents
Getting started
- Getting the sources
- Preparing a build environment
- Getting ready to contribute (i.e. forking GHC)
- Newcomers should also go to Contributing.
Visualisation
Using the new Hadrian build system
Using the old make-based build system
More detailed information about using the build system
- Using the build system
- Standard targets
- Making GHC's source code searchable with Hoogle
- Building the documentation
- Installing GHC from a build
- Unregisterised builds
- Loading GHC into GHCi
How to test and benchmark GHC
Information about libraries (= packages)
More detailed information about how the build system works
Porting GHC and building cross compilers
- Platforms that GHC currently supports
- Cross-compilation
- Compiling for 32 bits on 64 bits
- Setting up a Debian system to build a GHC cross-compiler
- Some notes on the various moving parts involved in the Windows toolchain
- Nix RISCV64 cross environment (hacky)
Troubleshooting
Contributed documentation
Please feel free to add pages here. In due course, information can be incorporated into the main documentation above.
- SonyPS3 : Hints for building on the Sony PS3
- Arm64 : An attempt to cross-compile GHC for Android on ARM64.
- Quick Start: just build GHC
- Building GHC with SSP support on Windows
- Brief Guide for Compiling GHC to iOS