Commit e94cc29e authored by Michael Sloan's avatar Michael Sloan Committed by Krzysztof Gogolewski
Browse files

Use -fobject-code in the GHCi script for loading GHC

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/ -fobject-code`

Reviewers: bgamari, alpmestan, monoidal

Reviewed By: alpmestan, monoidal

Subscribers: alpmestan, rwbarton, thomie, carter

Differential Revision:
parent f811685c
......@@ -204,3 +204,8 @@ GIT_COMMIT_ID
# Should be equal to testdir_suffix from testsuite/driver/
# -----------------------------------------------------------------------------
# Output of ghc-in-ghci
\ No newline at end of file
......@@ -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 \
......@@ -36,6 +36,12 @@
:set -XNoImplicitPrelude
-- -fobject-code is required because bytecode doesn't support unboxed tuples
: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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment