1. 29 Feb, 2020 1 commit
  2. 08 Feb, 2020 2 commits
    • Ben Gamari's avatar
      Fix GhcThreaded setting · bec76733
      Ben Gamari authored
      This adopts a patch from NetBSD's packaging fixing the `GhcThreaded`
      option of the make build system. In addition we introduce a `ghcThreaded`
      option in hadrian's `Flavour` type.
      
      Also fix Hadrian's treatment of the `Use Threaded` entry in `settings`.
      Previously it would incorrectly claim `Use Threaded = True` if we were
      building the `threaded` runtime way. However, this is inconsistent with
      the `make` build system, which defines it to be whether the `ghc`
      executable is linked against the threaded runtime.
      
      Fixes #17692.
      bec76733
    • Ben Gamari's avatar
      hadrian: Allow override of Cabal configuration in hadrian.settings · 7d04b9f2
      Ben Gamari authored
      Fixes #17612 by adding a `cabal.configure.opts` key for
      `hadrian.settings`.
      7d04b9f2
  3. 04 Jan, 2020 1 commit
  4. 07 Aug, 2019 1 commit
    • James Foster's avatar
      hadrian: Refactor file patterns for future Shake changes (fixes #17005) · 0c1ccf3c
      James Foster authored
      Shake will be moving from its current implementation of ?== to one from
      System.FilePattern. Support for `//` is being dropped, leaving only `*`
      and `**` as special forms. This commit converts the existing file
      patterns in Hadrian to the new format. It also removes all occurances
      of <//> and changes the user-settings docs to remove references to //
      and add **.
      
      The conversion is as follows:
      
      - //a ==> **/a
      
      - a// ==> a/**
      
      - a//b ==> a/**/b
      0c1ccf3c
  5. 10 Jul, 2019 1 commit
    • Alp Mestanogullari's avatar
      Hadrian: implement key-value settings for builder options · 18ac9ad4
      Alp Mestanogullari authored
      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 additions to the `Settings` module make use of this to describe the
      settings that Hadrian currently supports, and apply all such
      key-value settings (from the command line and `<root>/hadrian.settings`)
      to the flavour that Hadrian is going to proceed with.
      
      This new setting system comes with support for generating Bash completions,
      implemented in `hadrian/completion.sh` and Hadrian's `autocomplete` target:
      
      > source hadrian/completion.sh
      > hadrian/build.sh stage1.base.ghc.<TAB>
      stage1.base.ghc.c.opts     stage1.base.ghc.hs.opts
      stage1.base.ghc.*.opts     stage1.base.ghc.deps.opts
      stage1.base.ghc.link.opts  stage1.base.ghc.toolargs.opts
      18ac9ad4
  6. 13 May, 2019 1 commit
  7. 18 Apr, 2019 1 commit
  8. 27 Mar, 2019 1 commit
    • Alp Mestanogullari's avatar
      Hadrian: introduce an easy way for users to build with -split-sections · fb12f53c
      Alp Mestanogullari authored
      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`.
      fb12f53c
  9. 06 Mar, 2019 1 commit
    • Ben Gamari's avatar
      Rip out object splitting · 37f257af
      Ben Gamari authored
      The splitter is an evil Perl script that processes assembler code.
      Its job can be done better by the linker's --gc-sections flag. GHC
      passes this flag to the linker whenever -split-sections is passed on
      the command line.
      
      This is based on @DemiMarie's D2768.
      
      Fixes Trac #11315
      Fixes Trac #9832
      Fixes Trac #8964
      Fixes Trac #8685
      Fixes Trac #8629
      37f257af
  10. 01 Mar, 2019 1 commit
    • Alp Mestanogullari's avatar
      Hadrian: introduce ways to skip some documentation targets · 8442103a
      Alp Mestanogullari authored
      The initial motivation for this is to have a chance to run the binary
      distribution rules in our Windows CI without having to install
      sphinx-build and xelatex there, while retaining the ability to
      generate haddocks. I just ended up extending this idea a little bit so
      as to have control over whether we build haddocks, (sphinx) HTML manuals,
      (sphinx) PDF manuals and (sphinx) manpages.
      8442103a
  11. 03 Feb, 2019 1 commit
  12. 02 Feb, 2019 1 commit
  13. 09 Jan, 2019 1 commit
    • Matthew Pickering's avatar
      Hadrian: Add support for building stage3 · 6486c6e4
      Matthew Pickering authored
      This ticket enables the building of a `stage3` compiler by making the
      build logic more consistent and predictable in Hadrian.
      
      Two of the main changes are:
      
      1. In order to build anything at stageN we use the package database
      present at stageN. Fixing #16069
      2. `haddock` and `ghc-tags` are built
      as stage1 executables (with the stage1 compiler) rather than as
      stage2 compiler. Fixing
      [hadrian#661](https://github.com/snowleopard/hadrian/issues/661)
      
      In order to build a stage3 compiler, you have to set the new `finalStage` hadrian option to `Stage3`.
      6486c6e4
  14. 17 Dec, 2018 1 commit
    • Alp Mestanogullari's avatar
      Hadrian: introduce userDefaultFlavour, making default flavour overridable · c42eb2e6
      Alp Mestanogullari authored
      This patch introduces the `userDefaultFlavour` user setting. It should
      be the name of the default flavour to use when no --flavour argument is
      passed. Before this patch, we would just always default to... the
      `default` flavour. With this patch, we default to whatever Flavour whose
      name is `userDefaultFlavour`, therefore providing a way for users to
      "persist" their choice of flavour, not having to repeat --flavour=[...]
      in every hadrian command.
      
      Test Plan:
      Set `userDefaultFlavour = "quickest"`, run `hadrian/build.sh`, check
      that the quickest flavour is indeed picked.
      
      Reviewers: snowleopard, bgamari
      
      Reviewed By: snowleopard
      
      Subscribers: mpickering, rwbarton, carter
      
      GHC Trac Issues: #15890
      
      Differential Revision: https://phabricator.haskell.org/D5454
      c42eb2e6
  15. 08 Dec, 2017 1 commit