[commit: ghc] master: Cabal-level sanity check to enforce Cabal flag-invariant (0e21678)
git at git.haskell.org
git at git.haskell.org
Tue Nov 3 22:18:53 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0e21678677894ed7cb236499ec6f2041efae22a2/ghc
>---------------------------------------------------------------
commit 0e21678677894ed7cb236499ec6f2041efae22a2
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Tue Nov 3 16:18:30 2015 -0600
Cabal-level sanity check to enforce Cabal flag-invariant
This helps catch cabal-flag misconfiguration early on during `cabal
configure`, rather than much later in the build-process during
compilation.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D1423
>---------------------------------------------------------------
0e21678677894ed7cb236499ec6f2041efae22a2
libraries/base/base.cabal | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
index d98e7bf..e94d389 100644
--- a/libraries/base/base.cabal
+++ b/libraries/base/base.cabal
@@ -94,6 +94,11 @@ Library
Unsafe
build-depends: rts == 1.0.*, ghc-prim == 0.5.*
+
+ -- sanity-check to ensure exactly one flag is set
+ if !((flag(integer-gmp) && !flag(integer-simple)) || (!flag(integer-gmp) && flag(integer-simple)))
+ build-depends: invalid-cabal-flag-settings<0
+
if flag(integer-simple)
build-depends: integer-simple >= 0.1.1 && < 0.2
More information about the ghc-commits
mailing list