summaryrefslogtreecommitdiff
path: root/hadrian/src
diff options
context:
space:
mode:
authorDavid Eichmann <EichmannD@gmail.com>2018-11-14 15:43:57 +0100
committerAlp Mestanogullari <alp@well-typed.com>2018-11-14 15:43:58 +0100
commit89fa34ecd326de879145e6d854306eb17722bf6c (patch)
tree340259fa0bd013f4f38c4d6a2e4efc1f6d3c86fa /hadrian/src
parent5b98a38a32f2bc8491dc897631be8892919e2143 (diff)
downloadhaskell-89fa34ecd326de879145e6d854306eb17722bf6c.tar.gz
hadrian: build ghc-iserv-dyn
... in addition to ghc-iserv and ghc-iserv-prof, as it is required to get 10+ tests to pass Reviewers: bgamari, alpmestan Reviewed By: alpmestan Subscribers: alpmestan, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5327
Diffstat (limited to 'hadrian/src')
-rw-r--r--hadrian/src/Packages.hs12
-rw-r--r--hadrian/src/Rules/Program.hs23
-rw-r--r--hadrian/src/Rules/Test.hs2
3 files changed, 22 insertions, 15 deletions
diff --git a/hadrian/src/Packages.hs b/hadrian/src/Packages.hs
index 4ce1a2cfb0..24f56908a0 100644
--- a/hadrian/src/Packages.hs
+++ b/hadrian/src/Packages.hs
@@ -139,10 +139,14 @@ programName Context {..} = do
return $ prefix ++ case package of
p | p == ghc -> "ghc"
| p == hpcBin -> "hpc"
- | p == iserv ->
- if Profiling `wayUnit` way
- then "ghc-iserv-prof"
- else "ghc-iserv"
+ | p == iserv -> "ghc-iserv" ++ concat [
+ if wayUnit' `wayUnit` way
+ then suffix
+ else ""
+ | (wayUnit', suffix) <- [
+ (Profiling, "-prof"),
+ (Dynamic, "-dyn")
+ ]]
_ -> pkgName package
-- | The 'FilePath' to a program executable in a given 'Context'.
diff --git a/hadrian/src/Rules/Program.hs b/hadrian/src/Rules/Program.hs
index 7128a759c2..aeed0268f8 100644
--- a/hadrian/src/Rules/Program.hs
+++ b/hadrian/src/Rules/Program.hs
@@ -29,18 +29,21 @@ buildProgram rs = do
let allPackages = sPackages
++ if stage == Stage1 then tPackages else []
nameToCtxList <- fmap concat . forM allPackages $ \pkg -> do
- -- the iserv pkg results in two different programs at
- -- the moment, ghc-iserv (built the vanilla way)
- -- and ghc-iserv-prof (built the profiling way), and
- -- the testsuite requires both to be present, so we
+ -- the iserv pkg results in three different programs at
+ -- the moment, ghc-iserv (built the vanilla way),
+ -- ghc-iserv-prof (built the profiling way), and
+ -- ghc-iserv-dyn (built the dynamic way).
+ -- The testsuite requires all to be present, so we
-- make sure that we cover these
-- "prof-build-under-other-name" cases.
- -- iserv gets its two names from Packages.hs:programName
- let ctxV = vanillaContext stage pkg
- ctxProf = Context stage pkg profiling
- nameV <- programName ctxV
- nameProf <- programName ctxProf
- return [ (nameV <.> exe, ctxV), (nameProf <.> exe, ctxProf) ]
+ -- iserv gets its names from Packages.hs:programName
+ let allCtxs = [ vanillaContext stage pkg
+ , Context stage pkg profiling
+ , Context stage pkg dynamic
+ ]
+ forM allCtxs $ \ctx -> do
+ name <- programName ctx
+ return (name <.> exe, ctx)
case lookup (takeFileName bin) nameToCtxList of
Nothing -> error $ "Unknown program " ++ show bin
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index 6a02ce6d0e..de73390831 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -106,7 +106,7 @@ timeoutProgBuilder = do
needIservBins :: Action ()
needIservBins =
need =<< traverse programPath
- [ Context Stage1 iserv w | w <- [vanilla, profiling] ]
+ [ Context Stage1 iserv w | w <- [vanilla, profiling, dynamic] ]
needTestBuilders :: Action ()
needTestBuilders = do