diff options
author | Michael Sloan <mgsloan@gmail.com> | 2018-08-06 19:19:47 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2018-08-06 19:19:48 +0200 |
commit | e94cc29ef65d27536a9430c4c84665b6f6b7d65b (patch) | |
tree | 7b5bbaa4e9ef3e7ed93f27e72e140b7cdea3ec5c /utils/ghc-in-ghci | |
parent | f811685c3c1579333743da135c8cb80924aea4ce (diff) | |
download | haskell-e94cc29ef65d27536a9430c4c84665b6f6b7d65b.tar.gz |
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
Diffstat (limited to 'utils/ghc-in-ghci')
-rwxr-xr-x | utils/ghc-in-ghci/run.sh | 2 | ||||
-rw-r--r-- | utils/ghc-in-ghci/settings.ghci | 6 |
2 files changed, 6 insertions, 2 deletions
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 |