summaryrefslogtreecommitdiff
path: root/rts/rts.cabal.in
diff options
context:
space:
mode:
Diffstat (limited to 'rts/rts.cabal.in')
-rw-r--r--rts/rts.cabal.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index 22846ecc61..3943971592 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -12,6 +12,8 @@ flag libdl
default: @CabalHaveLibdl@
flag ffi
default: @CabalHaveLibffi@
+flag use-system-libffi
+ default: @CabalUseSystemLibFFI@
flag need-pthread
default: @CabalNeedLibpthread@
flag libbfd
@@ -55,10 +57,14 @@ library
-- expects the unit-id to be
-- set without version
ghc-options: -this-unit-id rts
- if os(windows)
- extra-bundled-libraries: Cffi-6
- else
- extra-bundled-libraries: Cffi
+
+ -- If we are using an in-tree libffi then we must declare it as a bundled
+ -- library to ensure that Cabal installs it.
+ if !flag(use-system-libffi)
+ if os(windows)
+ extra-bundled-libraries: Cffi-6
+ else
+ extra-bundled-libraries: Cffi
-- The make build system does something special in config.mk.in
-- for generating profiled, debugged, etc builds of those