diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-04-28 13:28:08 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-04-28 14:50:13 +0100 |
commit | b89604a4bc7aff32086aac967f557b0fa70319c9 (patch) | |
tree | 6a1325558b19442a32823d1630825fc12435af31 | |
parent | 809c3d174db0c80f9b049ccf2c339231ba5ae7c9 (diff) | |
download | haskell-wip/doug/hadrian-fixes.tar.gz |
testsuite: Fix calculation about whether to pass -dynamic to compilerwip/doug/hadrian-fixeswip/debug_ghc_trans
-rw-r--r-- | hadrian/src/Rules/Test.hs | 8 | ||||
-rw-r--r-- | hadrian/src/Settings/Builders/RunTest.hs | 6 |
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 |