From fbaa58ba1c62e3087f3fdb3c1c295d1d797d62ec Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 15 Oct 2012 19:48:23 +0200 Subject: Add 'dev' flag to cabal file, that builds without -O2 That way --disable-optimization can be used, which decreases build time considerably. --- haddock.cabal | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'haddock.cabal') 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 -- cgit v1.2.3