on master help sign in
Enable asserts only after the -O2 option
commite2d562820430862f0fcf3e04852655ab0286a911 authorHarendra Kumar <harendra@composewell.com> dateSat 19 Aug 2023, 04:41 (3 years ago) parenta819eb7
1 file changed+5−3
benchmark/streamly-benchmarks.cabal+5−3
benchmark/streamly-benchmarks.cabal+5−3
@@ -152,15 +152,17 @@ common compile-options
152152 ghc-options: -Wmissed-specialisations
153153 -Wall-missed-specialisations
154154
155− if flag(dev) || flag(debug)
156− ghc-options: -fno-ignore-asserts
157−
158155common optimization-options
159156 if flag(opt)
160157 ghc-options: -O2
161158 -fdicts-strict
162159 -fspec-constr-recursive=16
163160 -fmax-worker-args=16
161+
162+ -- For this to be effective it must come after the -O2 option
163+ if flag(dev) || flag(debug)
164+ ghc-options: -fno-ignore-asserts
165+
164166 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
165167 ghc-options: -fplugin Fusion.Plugin
166168 else