Commit ce9a1232 authored by Simon Marlow's avatar Simon Marlow
Browse files

Fix #3461: protect the use of keepCAFs with #ifdef DYNAMIC

parent d9718410
......@@ -6,9 +6,11 @@
// This is required so that GHCi can use dynamic libraries instead of HSxyz.o
// files.
#ifdef DYNAMIC
static void keepCAFsForGHCi() __attribute__((constructor));
static void keepCAFsForGHCi()
{
keepCAFs = 1;
}
#endif
......@@ -330,6 +330,7 @@ newCAF(StgClosure* caf)
{
ACQUIRE_SM_LOCK;
#ifdef DYNAMIC
if(keepCAFs)
{
// HACK:
......@@ -347,6 +348,7 @@ newCAF(StgClosure* caf)
caf_list = caf;
}
else
#endif
{
/* Put this CAF on the mutable list for the old generation.
* This is a HACK - the IND_STATIC closure doesn't really have
......
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