Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.6k
    • Issues 5.6k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 663
    • Merge requests 663
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Wiki
  • Building
  • hadrian

hadrian · Changes

Page history
add notes about Hadrian options authored Oct 21, 2021 by Norman Ramsey's avatar Norman Ramsey
suggested by Matthew Pickering, ghc-devs mailing list
Hide whitespace changes
Inline Side-by-side
building/hadrian.md
View page @ 412b4e62
......@@ -44,9 +44,13 @@ build docs # generate documentation
The `./validate` script uses Hadrian by default and can be used to build GHC, produce and install a bindist and run the testsuite against it in one simple command. You can read more about this in [Validating patches](https://gitlab.haskell.org/ghc/ghc/-/wikis/testing-patches).
## Subsequent Builds
## Subsequent builds and tests
To speed up subsequent builds, you will often want to avoid rebuilding the stage 1 compiler by passing `--freeze1` to `build`.
To rebuild GHC after pulling upstream changes, you may need to update the submodules via `git submodule update --init --recursive`. Alternatively you can configure git to do this for you automatically: `git config --local submodule.recurse true`.
To speed up subsequent builds, you will often want to add this option to `build`:
- `--freeze1` (avoid rebuilding the stage 1 compiler) documentation tests
A good compromise between a fast compiler which passes most the testsuite and fast rebuilds is building with the following options.
......@@ -54,7 +58,12 @@ A good compromise between a fast compiler which passes most the testsuite and fa
./hadrian/build --flavour=default+no_profiled_libs+omit_pragmas --freeze1 -j
```
After pulling upstream changes, you may need to update the submodules via `git submodule update --init --recursive`. Alternatively you can configure git to do this for you automatically: `git config --local submodule.recurse true`.
To speed up testing of your modified GHC, you may want to add these options to `test`:
- `--docs=none` (disable documentation tests)
- `--skip-perf` (disable performance tests)
## Going further
......@@ -119,4 +128,4 @@ Note how this even allows for a Ticky-enabled build through creation of a `hadri
- `hb..` for `hadrian/build`
- `..{q,v,t,...}.` for quick, validate and ticky (similarly prof and devel2) flavours
- `...{s,f,}` for a build where we only want to rebuild the stage1 compiler (takes ~10s instead of 30s on my machine), where we only want to rebuild the stage2 compiler without recompiling stage1 or the RTS, or a complete rebuild.
\ No newline at end of file
- `...{s,f,}` for a build where we only want to rebuild the stage1 compiler (takes ~10s instead of 30s on my machine), where we only want to rebuild the stage2 compiler without recompiling stage1 or the RTS, or a complete rebuild.
Clone repository

GHC Home
GHC User's Guide

Joining In

Newcomers info
Mailing Lists & IRC
The GHC Team

Documentation

GHC Status Info
Working conventions
Building Guide
Debugging
Commentary

Wiki

Title Index
Recent Changes