diff options
author | Simon Hengel <sol@typeful.net> | 2012-10-15 19:48:23 +0200 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2012-10-15 19:53:40 +0200 |
commit | fbaa58ba1c62e3087f3fdb3c1c295d1d797d62ec (patch) | |
tree | a30c3ae362fff048ca9c1ae572399d4948b27caf /haddock.cabal | |
parent | 3c5efc1361484f55d9e40b6be4618b2ff8aded26 (diff) |
Add 'dev' flag to cabal file, that builds without -O2
That way --disable-optimization can be used, which decreases build time
considerably.
Diffstat (limited to 'haddock.cabal')
-rw-r--r-- | haddock.cabal | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/haddock.cabal b/haddock.cabal index 67e86452..78a6ed73 100644 --- a/haddock.cabal +++ b/haddock.cabal @@ -52,11 +52,22 @@ flag in-ghc-tree default: False manual: True +-- Using this disables -O2, and hence allows to use --disable-optimization, +-- which is about twice as fast. This should probably be the default, but we +-- need some benchmarks first.. +flag dev + default: False + manual: True + executable haddock default-language: Haskell2010 main-is: Main.hs hs-source-dirs: driver - ghc-options: -funbox-strict-fields -O2 -Wall -fwarn-tabs + + if flag(dev) + ghc-options: -funbox-strict-fields -Wall -fwarn-tabs + else + ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 build-depends: base >= 4.3 && < 4.7 @@ -129,7 +140,10 @@ library build-depends: ghc-paths hs-source-dirs: src - ghc-options: -funbox-strict-fields -O2 -Wall -fwarn-tabs + if flag(dev) + ghc-options: -funbox-strict-fields -Wall -fwarn-tabs + else + ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 exposed-modules: Documentation.Haddock |