summaryrefslogtreecommitdiff
path: root/hadrian/src
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-04-28 13:28:08 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-28 18:54:44 -0400
commit769279e65a67ae67bd707152f82af6b1b1bbf133 (patch)
tree53640a09fb2d32551026b89490e336f9ba324602 /hadrian/src
parentf9728fdbe58fd8d8ccabdf7a9fecff83456dd0f8 (diff)
downloadhaskell-769279e65a67ae67bd707152f82af6b1b1bbf133.tar.gz
testsuite: Fix calculation about whether to pass -dynamic to compiler
Diffstat (limited to 'hadrian/src')
-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