Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,866
    • Issues 4,866
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 458
    • Merge requests 458
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • 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 Compiler
  • GHCGHC
  • Issues
  • #18942
Closed
Open
Created Nov 11, 2020 by Ben Gamari@bgamari🐢Maintainer

Hadrian flavours should be more compositional

Currently Hadrian's notion of a flavour is a very rudimentary: flavours have names and fully define a build configuration. As a consequence, we have reproduced an unfortunate characteristic of the make build system: an exponential explosion of flavours.

However, in the Flavour module we have grown a number of "flavour transformers" which modify flavours in various ways:

  • enableDebugInfo enables native debug information in the boot libraries and GHC
  • werror enables -Werror in the stage2 build
  • enableTickyGhc builds GHC with Ticky-Ticky support
  • splitSections enables section splitting
  • enableThreadSanitizer enables TSAN in the stage2 build and GHC executable

In principle this is great: you can take a simple base flavour and compositionally add features to it with these combinators. However, we currently provide no way to do so from the command-line. You rather need to edit UserSettings.hs, defining your own flavour in Haskell (using these combinators).

I propose that we extend the syntax accepted by the --flavour command-line flag to allow specification of "transformers", in addition to a base flavour. For instance, one might write:

hadrian/build-cabal --flavour=perf+werror+tickyGhc

which would be equivalent to defining a flavour werror $ enableTickyGhc performance. This would be easy to implement and allow us to eliminate all of the LLVM flavours currently defined in the Hadrian tree (turning them into a single flavour transformer).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking