diff options
author | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2020-06-17 16:46:02 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-07 13:56:04 -0400 |
commit | c59faf67fec83c98ffd1b65f1be0775b34f36595 (patch) | |
tree | 7a13bb77d79e631086f75dcbf5aa63e6cf6c3eb4 | |
parent | f496c9550098ffaa3bf25a3447c138626d79bae0 (diff) | |
download | haskell-c59faf67fec83c98ffd1b65f1be0775b34f36595.tar.gz |
hadrian: link check-ppr against debugging RTS if ghcDebugged
-rw-r--r-- | hadrian/src/Rules/Test.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs index 594651191c..2104e3312b 100644 --- a/hadrian/src/Rules/Test.hs +++ b/hadrian/src/Rules/Test.hs @@ -74,9 +74,14 @@ testRules = do need (ghcPath : depsLibs) bindir <- getBinaryDirectory testGhc + debugged <- ghcDebugged <$> flavour cmd [bindir </> "ghc" <.> exe] $ concatMap (\p -> ["-package", pkgName p]) depsPkgs ++ - ["-o", top -/- path, top -/- sourcePath] + ["-o", top -/- path, top -/- sourcePath] ++ + -- 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 [] root -/- ghcConfigPath %> \_ -> do args <- userSetting defaultTestArgs |