Skip to content
Snippets Groups Projects
Commit 26e86984 authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

hadrian: Allow haddock options to be passed via key-value settings

parent 6d95cdb8
No related branches found
No related tags found
No related merge requests found
Pipeline #103338 canceled
......@@ -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
......
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment