[Git][ghc/ghc][master] hadrian: Allow haddock options to be passed via key-value settings

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Nov 18 09:05:58 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00
hadrian: Allow haddock options to be passed via key-value settings

- - - - -


2 changed files:

- hadrian/doc/user-settings.md
- hadrian/src/Flavour.hs


Changes:

=====================================
hadrian/doc/user-settings.md
=====================================
@@ -138,6 +138,9 @@ the right names for them:
   * `runtest.opts` defines extra arguments passed to `runtest.py` when
     invoked via the `hadrian test` target.
 
+  * `haddock.build-package.opts` defines arguments to be passed to Haddock
+    when building documentation.
+
 - using a wildcard (`*`) ranges over all possible values for a given "slot";
 - `=` entirely overrides the arguments for a given builder in a given context,
   with the value specified on the right hand side of `=`, while `+=` merely


=====================================
hadrian/src/Flavour.hs
=====================================
@@ -555,6 +555,7 @@ builderPredicate = builderSetting <&> (\(wstg, wpkg, builderMode) ->
        BM_CabalConfigure -> builder (Cabal Setup)
        BM_RunTest        -> builder Testsuite
        BM_Hsc2HsRun      -> builder Hsc2Hs
+       BM_Haddock        -> builder (Haddock BuildPackage)
     )
   )
 
@@ -566,6 +567,7 @@ data BuilderMode = BM_Ghc (Wildcard GhcMode)
                  | BM_CabalConfigure
                  | BM_Hsc2HsRun
                  | BM_RunTest
+                 | BM_Haddock
 
 -- | Interpretation-agnostic description of the builder settings
 --   supported by Hadrian.
@@ -606,6 +608,7 @@ builderSetting =
              , str "cc" *> fmap BM_Cc (wild ccBuilder) <* str "opts"
              , BM_CabalConfigure <$ str "cabal" <* str "configure" <* str "opts"
              , BM_Hsc2HsRun <$ str "hsc2hs" <* str "run" <* str "opts"
+             , BM_Haddock   <$ str "haddock" <* str "build-package" <* str "opts"
              ]
     , (Wildcard, Wildcard, BM_RunTest)
       <$ str "runtest" <* str "opts"



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/26e8698429be8b4168c6586fdc20d239ef600912

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/26e8698429be8b4168c6586fdc20d239ef600912
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241118/dd37906d/attachment-0001.html>


More information about the ghc-commits mailing list