From 1a1ca2f61898234ba14f68bfc498db875b37e8e6 Mon Sep 17 00:00:00 2001 From: hallgren Date: Tue, 22 Apr 2014 12:43:24 +0000 Subject: [PATCH] gf.cabal: add GF builtin default -K64M. Enable parallel compile with ghc>=7.8 + Programs compiled with ghc<7.8 have a default built-in 8M stack size limit. With ghc>7.0 this built-in default can be changed, so it is now 64M, allowing GF to work with larger grammars without manually increasing the stack size. (But if GF is compiled with ghc 6.12, the built-in default is still 8M.) + Enable ghc>=7.8 support for compiling modules in parallel, to speed up the compilation of GF. --- gf.cabal | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gf.cabal b/gf.cabal index 625865b1b..298edc892 100644 --- a/gf.cabal +++ b/gf.cabal @@ -88,6 +88,8 @@ Library build-depends: binary ghc-options: -fwarn-unused-imports + if impl(ghc>=7.8) + ghc-options: -j +RTS -A20M -RTS ghc-prof-options: -auto-all extensions: @@ -157,13 +159,15 @@ Executable gf if flag(c-runtime) cpp-options: -DC_RUNTIME ---if flag(new-comp) --- cpp-options: -DNEW_COMP - build-tools: happy + if impl(ghc>=7.0) + ghc-options: -rtsopts + if impl(ghc<7.8) + ghc-options: -with-rtsopts=-K64M if impl(ghc>=7.8) build-tools: happy>=1.19, alex>=3.1 + ghc-options: -j +RTS -A20M -RTS else build-tools: happy, alex>=3 @@ -174,8 +178,6 @@ Executable gf ghc-prof-options: -auto-all - if impl(ghc>=7.0) - ghc-options: -rtsopts hs-source-dirs: src/compiler if !flag(custom-binary)