@@ -149,7 +149,9 @@ library
149149
150150common bench-options
151151 import: compile-options, optimization-options, bench-depends
152− ghc-options: -rtsopts +RTS -M512M -RTS
152+ ghc-options: -rtsopts
153+ if flag(limit-build-mem)
154+ ghc-options: +RTS -M512M -RTS
153155 build-depends: streamly-benchmarks == 0.0.0
154156
155157-- Some benchmarks are threaded some are not
@@ -157,7 +159,9 @@ common bench-options-threaded
157159 import: compile-options, optimization-options, bench-depends
158160 -- -threaded and -N2 is important because some GC and space leak issues
159161 -- trigger only with these options.
160− ghc-options: -threaded -rtsopts -with-rtsopts "-N2" +RTS -M512M -RTS
162+ ghc-options: -threaded -rtsopts -with-rtsopts "-N2"
163+ if flag(limit-build-mem)
164+ ghc-options: +RTS -M512M -RTS
161165 build-depends: streamly-benchmarks == 0.0.0
162166
163167-------------------------------------------------------------------------------