Unverified Commit abf9cbee authored by Andrey Mokhov's avatar Andrey Mokhov Committed by GitHub
Browse files

Build runghc instead of runhaskell (#670)

* Build runghc instead of runhaskell

* Minor revision (formatting, comments)
parent 12e6635a
......@@ -171,7 +171,7 @@ instance H.Builder Builder where
runtimeDependencies :: Builder -> Action [FilePath]
runtimeDependencies = \case
Autoreconf dir -> return [dir -/- "configure.ac"]
Configure dir -> return [dir -/- "configure"]
Configure dir -> return [dir -/- "configure"]
Ghc _ Stage0 -> return []
Ghc _ stage -> do
......@@ -230,7 +230,7 @@ instance H.Builder Builder where
Ar Unpack _ -> cmd echo [Cwd output] [path] buildArgs
Autoreconf dir -> cmd echo [Cwd dir] [path] buildArgs
Configure dir -> do
Configure dir -> do
-- Inject /bin/bash into `libtool`, instead of /bin/sh,
-- otherwise Windows breaks. TODO: Figure out why.
bash <- bashPath
......
......@@ -132,11 +132,9 @@ programName Context {..} = do
targetPlatform <- setting TargetPlatformFull
let prefix = if cross then targetPlatform ++ "-" else ""
-- TODO: Can we extract this information from Cabal files?
-- Also, why @runhaskell@ instead of @runghc@?
return $ prefix ++ case package of
p | p == ghc -> "ghc"
| p == hpcBin -> "hpc"
| p == runGhc -> "runhaskell"
| p == iserv -> "ghc-iserv"
_ -> pkgName package
......
This diff is collapsed.
......@@ -79,17 +79,13 @@ testRules = do
-- | Build extra programs and libraries required by testsuite
needTestsuitePackages :: Action ()
needTestsuitePackages = do
targets <- mapM (needFile Stage1) =<< testsuitePackages
binPath <- stageBinPath Stage1
libPath <- stageLibPath Stage1
iservPath <- needFile Stage1 iserv
runhaskellPath <- needFile Stage1 runGhc
targets <- mapM (needFile Stage1) =<< testsuitePackages
libPath <- stageLibPath Stage1
iservPath <- needFile Stage1 iserv
need targets
-- | We need to copy iserv bin to lib/bin as this is where testsuite looks
-- | for iserv. Also, using runhaskell gives different stdout due to
-- | difference in program name. This causes StdMismatch errors.
-- | for iserv.
copyFile iservPath $ libPath -/- "bin/ghc-iserv"
copyFile runhaskellPath $ binPath -/- "runghc"
-- | Build the timeout program.
-- See: https://github.com/ghc/ghc/blob/master/testsuite/timeout/Makefile#L23
......
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