Hadrian: introduce an easy way for users to build with -split-sections
authorAlp Mestanogullari <alpmestan@gmail.com>
Fri, 15 Mar 2019 20:35:59 +0000 (21:35 +0100)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Wed, 27 Mar 2019 11:20:05 +0000 (07:20 -0400)
commitfb12f53c2779f15ee24786e8c3beae3133506a01
tree954591064a368662821b289a606a8a6706ca7d91
parent646f2e79c5d6e79341693b1b9660da974102cec2
Hadrian: introduce an easy way for users to build with -split-sections

Any user can now trivially build any number of Haskell packages with
`-split-sections` by using `splitSections`/`splitSectionsIf` on any
existing or new flavour:

    -- build all packages but the ghc library with -split-sections
    splitSections :: Flavour -> Flavour

    -- build all packages that satisfy the given predicate
    -- with --split-sections
    splitSectionsIf :: (Package -> Bool) -> Flavour -> Flavour

See the new section in `doc/user-settings.md`.
hadrian/doc/user-settings.md
hadrian/src/Flavour.hs