summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-04-22 12:43:24 +0000
committerhallgren <hallgren@chalmers.se>2014-04-22 12:43:24 +0000
commita2c25e88d425fd6d0779fb8b1ccf93379d6fe536 (patch)
treec71f7ff804ec932544db4b5b902aaf17805607a7
parent5847f8e18fe63ae43e843f8db1a3ee4cb649d76a (diff)
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.
-rw-r--r--gf.cabal12
1 files 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)