Skip to content

Commit 2a6be75

Browse files
authored
Add workaround for profiling bug in GHC 9.6/9.8 (#7416)
This bug caused a panic building plutus-metatheory with profiling enabled. We work around it by disabling automatic cost centres. See #7415
1 parent 4f0c0b0 commit 2a6be75

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

plutus-metatheory/plutus-metatheory.cabal

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,25 @@ common ghc-version-support
5858
if (impl(ghc <9.6) || impl(ghc >=9.7))
5959
buildable: False
6060

61+
-- GHC 9.6 and 9.8 have a bug where profiling ticks cause a panic in
62+
-- CoreToStg. We disable automatic cost centre generation to work around this.
63+
--
64+
-- If you need automatic cost centres, you have to manually edit the
65+
-- Agda-generated file src/MAlonzo/RTE.hs
66+
--
67+
-- See https://github.com/IntersectMBO/plutus/issues/7415
68+
common workaround-issue-7415
69+
if (impl(ghc >=9.6) && impl(ghc <9.10))
70+
ghc-prof-options: -fno-prof-auto
71+
6172
common os-support
6273
if (impl(ghcjs) || os(windows))
6374
buildable: False
6475

6576
library
66-
import: lang, os-support, ghc-version-support
77+
import:
78+
lang, os-support, ghc-version-support, workaround-issue-7415
79+
6780
hs-source-dirs: src
6881
build-depends:
6982
, aeson

0 commit comments

Comments
 (0)