[GHC] #15890: Provide a way for hadrian users to always pass some options to hadrian itself

GHC ghc-devs at haskell.org
Tue Nov 13 16:36:11 UTC 2018


#15890: Provide a way for hadrian users to always pass some options to hadrian
itself
-------------------------------------+-------------------------------------
        Reporter:  alpmestan         |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Build System      |              Version:  8.7
  (Hadrian)                          |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by snowleopard):

 I think we can already almost do this, have a look at this section in the
 docs:

 https://github.com/ghc/ghc/blob/master/hadrian/doc/user-settings.md
 #command-line-arguments

 For example, it's possible to add the following to `UserSetting.hs`:

 {{{#!haskell
 ryanFlavour :: Flavour
 ryanFlavour = performanceFlavour -- Note that we inherit all
 performanceFlavour settings
     { name           = "ryan"
     , args           = args performanceFlavour <> ryanArgs -- Further
 tweaks to Args
     , integerLibrary = pure integerSimple }

 ryanArgs :: Args
 ryanArgs = builder Ghc ? input "//Prelude.hs"? pure ["-ddump-simpl",
 "-ddump-to-file"]
 }}}

 And then invoke Hadrian with `--flavour=ryan` flag.

 There are several further improvements:

 * Make it possible to override the default flavour, so that it's not
 necessary to pass `--flavour=ryan`.

 * Add a new setting `buildThreads` to `Flavour`, so that one could set
 `buildThreads = 4` as part of the user flavour, instead of setting it
 separately via command line.

 * Similarly, add the build root setting to `Flavour` to support `buildRoot
 = "ghc-prof-build"`, which can still be overriden from the command line if
 need be.


 Alp, Ryan: Does this sound like the right thing to do? I'm happy to
 implement.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15890#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list