summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2023-02-10 15:00:44 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2023-02-10 15:00:44 +0000
commitad0d597094a66a1d2f5ccc948eb390e534cfb8da (patch)
tree2d845a0857f581ba8dd76f524c22075ada3d9a50
parentfe9cd6ef1a07d214b76bc286875cbf15985d9a7b (diff)
downloadhaskell-wip/ghci-run-segfault.tar.gz
ghci --run segfaultwip/ghci-run-segfault
-rw-r--r--ghc/ghc-bin.cabal.in1
-rwxr-xr-xhadrian/ghci-multi-cabal.in2
-rw-r--r--hadrian/hadrian.cabal2
-rw-r--r--hadrian/src/Rules/ToolArgs.hs4
4 files changed, 5 insertions, 4 deletions
diff --git a/ghc/ghc-bin.cabal.in b/ghc/ghc-bin.cabal.in
index 88e559048c..46c87d7c25 100644
--- a/ghc/ghc-bin.cabal.in
+++ b/ghc/ghc-bin.cabal.in
@@ -51,7 +51,6 @@ Executable ghc
-Wnoncanonical-monad-instances
-Wnoncanonical-monoid-instances
-rtsopts=all
- "-with-rtsopts=-K512M -H -I5 -T"
if flag(internal-interpreter)
-- NB: this is never built by the bootstrapping GHC+libraries
diff --git a/hadrian/ghci-multi-cabal.in b/hadrian/ghci-multi-cabal.in
index 90fccefa37..d1d984f7ce 100755
--- a/hadrian/ghci-multi-cabal.in
+++ b/hadrian/ghci-multi-cabal.in
@@ -10,4 +10,4 @@ export TOOL_OUTPUT=.hadrian_ghci_multi/ghci_args
# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
CABFLAGS=-v0 "hadrian/build-cabal" multi:ghc --build-root=.hadrian_ghci_multi --flavour=ghc-in-ghci $HADRIAN_ARGS
GHC_FLAGS="$GHC_FLAGS $(cat $TOOL_OUTPUT | tr '\n\r' ' ')"
-$RUN_GHC --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -O0 +RTS -A128m
+$RUN_GHC --run $GHC_FLAGS $@ -v3 -fwrite-if-simplified-core -fwrite-interface -O0 +RTS -A128m
diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal
index b0c4533b36..dd612654dc 100644
--- a/hadrian/hadrian.cabal
+++ b/hadrian/hadrian.cabal
@@ -157,7 +157,7 @@ executable hadrian
, extra >= 1.4.7
, filepath
, time
- , mtl >= 2.2 && < 2.4
+ , mtl >= 2.2 && < 2.5
, parsec >= 3.1 && < 3.2
, shake >= 0.18.3 && < 0.20
, transformers >= 0.4 && < 0.7
diff --git a/hadrian/src/Rules/ToolArgs.hs b/hadrian/src/Rules/ToolArgs.hs
index ae586c7d0d..c204c47891 100644
--- a/hadrian/src/Rules/ToolArgs.hs
+++ b/hadrian/src/Rules/ToolArgs.hs
@@ -56,7 +56,8 @@ multiSetup pkg_s = do
tool_targets <- case pkg_s of
Nothing -> return toolTargets
Just pkg_s -> case findPackageByName pkg_s of
- Just pkg -> (pkg :) . Set.toList <$> pkg_deps pkg
+ -- Put the requested package last so that's the one which is in scope
+ Just pkg -> (++ [pkg]) . Set.toList <$> pkg_deps pkg
Nothing -> error $ "Unknown package: " ++ pkg_s
-- Get the arguments for all the targets
pargs <- mapM one_args tool_targets
@@ -100,6 +101,7 @@ multiSetup pkg_s = do
-- See #20887
th_hack :: [String] -> [String]
th_hack ((isPrefixOf "-package-id template-haskell" -> True) : xs) = "-package-id" : "template-haskell" : xs
+ th_hack ((isPrefixOf "-package-id ghc-9" -> True) : xs) = "-package-id" : "ghc" : xs
th_hack (x:xs) = x : th_hack xs
th_hack [] = []