Add --flags=optimize for cabal configure

This commit is contained in:
John Wiegley 2018-04-22 11:09:56 -07:00
parent c7b6465016
commit a60181df3a
2 changed files with 18 additions and 3 deletions

View File

@ -2,7 +2,7 @@
--
-- see: https://github.com/sol/hpack
--
-- hash: bd76dbaf4832c321feb19fe34a80e29c90cdbc150048dcee92038f96725c4f30
-- hash: 16beb8d29116e6049b925d6727fb8e104c6722c162db8fa745bc2ec17724da47
name: hnix
version: 0.5.0
@ -25,6 +25,11 @@ source-repository head
type: git
location: https://github.com/jwiegley/hnix
flag optimize
description: Enable all optimization flags
manual: True
default: False
flag tracing
description: Enable full debug tracing
manual: True

View File

@ -33,8 +33,6 @@ dependencies:
ghc-options:
- -Wall
# - -fexpose-all-unfoldings
# - -O2
flags:
tracing:
@ -42,6 +40,18 @@ flags:
manual: True
default: False
optimize:
description: Enable all optimization flags
manual: True
default: False
when:
- condition: flag(optimize)
ghc-options:
- -fexpose-all-unfoldings
- -fspecialise-aggressively
- -O2
when:
- condition: flag(tracing)
cpp-options: -DENABLE_TRACING=1