Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,326
    • Issues 4,326
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 390
    • Merge Requests 390
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18942

Closed
Open
Opened 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).

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#18942