Commit 89fa34ec authored by David Eichmann's avatar David Eichmann 🏋 Committed by Alp Mestanogullari
Browse files

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
parent 5b98a38a
......@@ -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'.
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment