Skip to content
  • Alp Mestanogullari's avatar
    Hadrian: implement key-value settings for builder options · 18ac9ad4
    Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
    They take the general form `foo.bar.baz [+]= some values`, where
    `=` completely overrides the arguments for a builder and `+=` extends
    them. We currenly only support settings for updating the GHC and C
    compiler options, of the form:
    
    ```
      {stage0, ..., stage3 or *}.{package name or *}
                                .ghc.{c, hs, link, deps, toolargs or *}.opts
    
      {stage0, ..., stage3 or *}.{package name or *}
                                .cc.{c, deps or *}.opts
    ```
    
    The supported settings and their use is covered in the new section
    of `hadrian/doc/user-settings.md`, while the implementation is explained
    in a new Note [Hadrian settings].
    
    Most of the logic is implemented in a new module, `Settings.Parser`, which
    contains key-value assignment/extension parsers as well as utilities for
    specifying allowed settings at a high-level, generating a `Predicate` from
    such a description or generating the list of possible completions for a given
    string.
    
    The additi...
    18ac9ad4