summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-03-09 10:22:56 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-03-09 10:24:16 +0000
commit3cf75ede057148cc8e38692ff32013f7d3e4078f (patch)
tree1d0e28210f4ae779d2fe28beeb5d9b3bbe00f25c
parent7abe32889101f60c2779092eea75494d83254916 (diff)
downloadhaskell-3cf75ede057148cc8e38692ff32013f7d3e4078f.tar.gz
Revert "hadrian: Correctly set whether we have a debug compiler when running tests"
Needing the arguments for "GHC/Utils/Constant.hs" implies a dependency on the previous stage compiler. Whilst we work out how to get around this I will just revert this commit (as it only affects running the testsuite in debug way). This reverts commit ce65d0cceda4a028f30deafa3c39d40a250acc6a.
-rw-r--r--hadrian/src/Flavour/Type.hs2
-rw-r--r--hadrian/src/Settings/Builders/RunTest.hs12
2 files changed, 3 insertions, 11 deletions
diff --git a/hadrian/src/Flavour/Type.hs b/hadrian/src/Flavour/Type.hs
index b21953e9de..9f992fd6f2 100644
--- a/hadrian/src/Flavour/Type.hs
+++ b/hadrian/src/Flavour/Type.hs
@@ -32,7 +32,7 @@ data Flavour = Flavour {
ghciWithDebugger :: Bool,
-- | Build profiled GHC.
ghcProfiled :: Bool,
- -- | Build GHC with debug RTS
+ -- | Build GHC with debugging assertions.
ghcDebugged :: Bool,
-- | Build the GHC executable against the threaded runtime system.
ghcThreaded :: Bool,
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index 51a21183e1..6a49334a70 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -2,7 +2,7 @@
module Settings.Builders.RunTest (runTestBuilderArgs, runTestGhcFlags) where
import Hadrian.Utilities
-import System.Environment hiding (getArgs)
+import System.Environment
import CommandLine
import Oracles.TestSettings
@@ -12,7 +12,6 @@ import qualified Data.Set as Set
import Flavour
import qualified Context.Type as C
import System.Directory (findExecutable)
-import Hadrian.Target (target)
getTestSetting :: TestSetting -> Expr String
getTestSetting key = expr $ testSetting key
@@ -96,14 +95,7 @@ inTreeCompilerArgs stg = expr $ do
withInterpreter <- ghcWithInterpreter
unregisterised <- flag GhcUnregisterised
withSMP <- targetSupportsSMP
- -- --info reports "Debug on = YES" if debugIsOn = True which is set by passing -DDEBUG to
- -- "compiler/GHC/Utils/Constants.hs"
- debug_args <-
- interpret (target (Context stg compiler vanilla)
- (Ghc CompileHs stg)
- ["compiler" -/- "GHC" -/- "Utils" -/- "Constants.hs"] [""])
- getArgs
- let debugged = "-DDEBUG" `elem` debug_args
+ debugged <- ghcDebugged <$> flavour
profiled <- ghcProfiled <$> flavour
os <- setting HostOs