diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-07-21 09:22:06 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-07-27 04:47:51 -0400 |
commit | 63184a71277aa15608659ad20f45b7b0fe9746bc (patch) | |
tree | 09ebc39bfc16ec045931be9abd39005a144d5bf8 /rts | |
parent | dd3c9602fdb0d408509d166cc0bf05777753ca43 (diff) | |
download | haskell-63184a71277aa15608659ad20f45b7b0fe9746bc.tar.gz |
rts: Don't declare libCffi as bundled when using system libffi
Previously the rts's cabal file would claim that it bundled libffi, even
if we are using the system's libffi. Fixes #19869.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/rts.cabal.in | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in index ded2f15509..c46873e205 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 libffi-adjustors default: @CabalLibffiAdjustors@ flag need-pthread @@ -57,10 +59,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 |