summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hadrian/src/Rules/Test.hs8
-rw-r--r--hadrian/src/Settings/Builders/RunTest.hs6
2 files changed, 7 insertions, 7 deletions
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index e389506f3e..f12d7890b8 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -146,16 +146,12 @@ testRules = do
top <- topDirectory
depsPkgs <- mod_pkgs . packageDependencies <$> readPackageData progPkg
bindir <- getBinaryDirectory testGhc
- debugged <- ghcDebugged <$> flavour <*> pure (stageOf testGhc)
- dynPrograms <- dynamicGhcPrograms =<< flavour
+ test_args <- outOfTreeCompilerArgs
+ let dynPrograms = hasDynamic test_args
cmd [bindir </> "ghc" <.> exe] $
concatMap (\p -> ["-package", pkgName p]) depsPkgs ++
["-o", top -/- path, top -/- sourcePath] ++
mextra ++
- -- If GHC is build with debug options, then build check-ppr
- -- also with debug options. This allows, e.g., to print debug
- -- messages of various RTS subsystems while using check-ppr.
- (if debugged then ["-debug"] else []) ++
-- If GHC is build dynamic, then build check-ppr also dynamic.
(if dynPrograms then ["-dynamic"] else [])
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index cc0f955c7f..0e442cb9be 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -1,5 +1,9 @@
{-# LANGUAGE TypeApplications #-}
-module Settings.Builders.RunTest (runTestBuilderArgs, runTestGhcFlags, assertSameCompilerArgs) where
+module Settings.Builders.RunTest (runTestBuilderArgs
+ , runTestGhcFlags
+ , assertSameCompilerArgs
+ , outOfTreeCompilerArgs
+ , TestCompilerArgs(..) ) where
import Hadrian.Utilities
import qualified System.FilePath