summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/Test.hs
diff options
context:
space:
mode:
authorAndrey Mokhov <andrey.mokhov@gmail.com>2019-06-23 00:50:43 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-25 01:36:10 -0400
commit15b262237ab055f4afbf79588f76631a194a332f (patch)
treebb04ea8eb6e5a4fffdecc2010d7b4782589cfb7b /hadrian/src/Rules/Test.hs
parent581cbc28e143a4ed8e7f794ed1618161222a5646 (diff)
downloadhaskell-15b262237ab055f4afbf79588f76631a194a332f.tar.gz
Fix cyclic dependencies when using --configure
This resolves #16809 (https://gitlab.haskell.org/ghc/ghc/issues/16809). This patch removes the unnecessary dependency on configure-generated flags `windowsHost`, `osxHost` and `iosHost`, using the information provided by the module `System.Info` instead. We also take care to use the `CrossCompiling` flag generated by the configure script only after the latter had a chance to run.
Diffstat (limited to 'hadrian/src/Rules/Test.hs')
-rw-r--r--hadrian/src/Rules/Test.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index f5d0dd53b6..23352ed260 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -135,8 +135,7 @@ testRules = do
timeoutProgBuilder :: Action ()
timeoutProgBuilder = do
root <- buildRoot
- windows <- windowsHost
- if windows
+ if windowsHost
then do
prog <- programPath =<< programContext Stage1 timeout
copyFile prog (root -/- timeoutPath)
@@ -178,8 +177,7 @@ stageOf _ = error "unexpected stage argument"
needIservBins :: Action ()
needIservBins = do
-- iserv is not supported under Windows
- windows <- windowsHost
- when (not windows) $ do
+ when (not windowsHost) $ do
testGhc <- testCompiler <$> userSetting defaultTestArgs
let stg = stageOf testGhc
rtsways <- interpretInContext (vanillaContext stg ghc) getRtsWays