From e94cc29ef65d27536a9430c4c84665b6f6b7d65b Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Mon, 6 Aug 2018 19:19:47 +0200 Subject: Use -fobject-code in the GHCi script for loading GHC Summary: My very last commit to D4904 removed -fobject-code. I should have tested this more thoroughly, because it is required to do a fresh ghci load, as some code uses unboxed tuples. One of my motivations for doing this was that if you run the script without passing -odir / -hidir, it would pollute the source tree with .hi and .o files. This also appeared to break subsequent builds. I've made it much less likely that this will happen by instead specifying -odir and -hidir within the ghci script rather than on the commandline. I plan to open a separate diff which adds a test that these scripts work. Until this patch is merged, the workaround is to do `./utils/ghc-in-ghci/run.sh -fobject-code` Reviewers: bgamari, alpmestan, monoidal Reviewed By: alpmestan, monoidal Subscribers: alpmestan, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D5015 --- utils/ghc-in-ghci/run.sh | 2 -- utils/ghc-in-ghci/settings.ghci | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'utils/ghc-in-ghci') diff --git a/utils/ghc-in-ghci/run.sh b/utils/ghc-in-ghci/run.sh index 2dda647903..521458f67d 100755 --- a/utils/ghc-in-ghci/run.sh +++ b/utils/ghc-in-ghci/run.sh @@ -30,7 +30,5 @@ exec ./inplace/bin/ghc-stage2 \ --interactive \ -ghci-script ./utils/ghc-in-ghci/settings.ghci \ -ghci-script ./utils/ghc-in-ghci/load-main.ghci \ - -odir ./ghci-tmp \ - -hidir ./ghci-tmp \ +RTS -A128m -RTS \ "$@" diff --git a/utils/ghc-in-ghci/settings.ghci b/utils/ghc-in-ghci/settings.ghci index 1348274288..8f5ba6e031 100644 --- a/utils/ghc-in-ghci/settings.ghci +++ b/utils/ghc-in-ghci/settings.ghci @@ -36,6 +36,12 @@ :set -DGHC_LOADED_INTO_GHCI :set -XNoImplicitPrelude +-- -fobject-code is required because bytecode doesn't support unboxed tuples +-- https://ghc.haskell.org/trac/ghc/ticket/1257 +:set -odir ./.ghci-objects +:set -hidir ./.ghci-objects +:set -fobject-code + -- Setup args so that running "main" will run ghci and set the prompt to -- indicate that it is an inner ghci. :set args --interactive -ghci-script utils/ghc-in-ghci/inner.ghci -- cgit v1.2.1