summaryrefslogtreecommitdiff
path: root/rts/RtsUtils.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2013-10-08 16:58:24 +0100
committerSimon Marlow <marlowsd@gmail.com>2013-10-11 10:37:01 +0100
commitb9c6fd72cd8a00e7c3604567fc4170a3f6421d71 (patch)
tree92fc9e9da7944dd4189ac4dbd3bf2e1241f5a1aa /rts/RtsUtils.c
parent996206b15aa1d4e6d203934484b9076c4c8e1032 (diff)
downloadhaskell-b9c6fd72cd8a00e7c3604567fc4170a3f6421d71.tar.gz
Use dynamic linking only if the GHC package is compiled with -dynamic (#8376)
Diffstat (limited to 'rts/RtsUtils.c')
-rw-r--r--rts/RtsUtils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c
index cb9002c361..b06b6af962 100644
--- a/rts/RtsUtils.c
+++ b/rts/RtsUtils.c
@@ -304,6 +304,17 @@ int rts_isProfiled(void)
#endif
}
+// Provides a way for Haskell programs to tell whether they're
+// dynamically-linked or not.
+int rts_isDynamic(void)
+{
+#ifdef DYNAMIC
+ return 1;
+#else
+ return 0;
+#endif
+}
+
// Used for detecting a non-empty FPU stack on x86 (see #4914)
void checkFPUStack(void)
{