Support the GHCi debugger with -fexternal-interpreter
[ghc.git] / compiler / ghci / keepCAFsForGHCi.c
1 #include "Rts.h"
2
3 // This file is only included in the dynamic library.
4 // It contains an __attribute__((constructor)) function (run prior to main())
5 // which sets the keepCAFs flag in the RTS, before any Haskell code is run.
6 // This is required so that GHCi can use dynamic libraries instead of HSxyz.o
7 // files.
8
9 static void keepCAFsForGHCi(void) __attribute__((constructor));
10
11 static void keepCAFsForGHCi(void)
12 {
13 keepCAFs = 1;
14 }
15