summaryrefslogtreecommitdiff
path: root/compiler/ghci/keepCAFsForGHCi.c
blob: 805088e753359f4fd6b775a41fb93bebadb37618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "Rts.h"

// This file is only included when GhcBuildDylibs is set in mk/build.mk.
// It contains an __attribute__((constructor)) function (run prior to main())
// which sets the keepCAFs flag in the RTS, before any Haskell code is run.
// This is required so that GHCi can use dynamic libraries instead of HSxyz.o
// files.

#ifdef DYNAMIC
static void keepCAFsForGHCi(void) __attribute__((constructor));

static void keepCAFsForGHCi(void)
{
    keepCAFs = 1;
}
#endif