diff options
author | Simon Marlow <marlowsd@gmail.com> | 2018-09-28 14:27:22 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2018-09-28 14:27:22 +0200 |
commit | df67f95b2fc1c8b7200d98643e76c5feab4ed876 (patch) | |
tree | d383d3b324b4351b23afbf8e4202d6999585c042 /testsuite/tests/rts/KeepCafsBase.hs | |
parent | c89297ee41f218a92870563d881548754c3d89e4 (diff) | |
download | haskell-df67f95b2fc1c8b7200d98643e76c5feab4ed876.tar.gz |
Add -fkeep-cafs
Summary:
I noticed while playing around with
https://github.com/fbsamples/ghc-hotswap/ that the main binary needs to
have a custom main function to set `config.keep_cafs = true` when
initialising the runtime. This is pretty annoying, it means an extra
C file with some cryptic incantations in it, and a `-no-hs-main` flag.
So I've replaced this with a link-time flag to GHC, `-fkeep-cafs` that
does the same thing.
Test Plan:
New unit test that tests for the RTS's GC'd CAFs assertion, and also
the -keep-cafs flag.
Reviewers: bgamari, osa1, erikd, noamz
Reviewed By: osa1
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5183
Diffstat (limited to 'testsuite/tests/rts/KeepCafsBase.hs')
-rw-r--r-- | testsuite/tests/rts/KeepCafsBase.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/rts/KeepCafsBase.hs b/testsuite/tests/rts/KeepCafsBase.hs new file mode 100644 index 0000000000..184db3dcf0 --- /dev/null +++ b/testsuite/tests/rts/KeepCafsBase.hs @@ -0,0 +1,4 @@ +module KeepCafsBase (x) where + +x :: Int +x = last [1..1000] |