Skip to content

Commit

Permalink
When building with -ffixed-salt, don't pull in any PRNG code
Browse files Browse the repository at this point in the history
This is necessary to get us working with GHCi 7.6.1 on Windows x64.

See haskell-unordered-containersgh-46 and http://hackage.haskell.org/trac/ghc/ticket/7568 for the
unhappy details.
  • Loading branch information
bos committed Jan 11, 2013
1 parent 78a3000 commit 7d6fe7d
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions hashable.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Flag sse41
Library
Exposed-modules: Data.Hashable
Other-modules: Data.Hashable.Class
Data.Hashable.RandomSource
Data.Hashable.SipHash
Build-depends: base >= 4.0 && < 5.0,
bytestring >= 0.9
Expand All @@ -52,7 +51,7 @@ Library
CPP-Options: -DGENERICS
Other-modules: Data.Hashable.Generic

C-sources: cbits/getRandomBytes.c
C-sources:
cbits/inthash.c
cbits/siphash.c
if arch(i386)
Expand All @@ -67,8 +66,11 @@ Library
Ghc-options: -fwarn-tabs
if flag(fixed-salt)
Cpp-options: -DFIXED_SALT
if os(windows)
extra-libraries: advapi32
else
c-sources: cbits/getRandomBytes.c
other-modules: Data.Hashable.RandomSource
if os(windows)
extra-libraries: advapi32

Test-suite tests
Type: exitcode-stdio-1.0
Expand Down Expand Up @@ -116,7 +118,6 @@ benchmark benchmarks
Build-depends: integer-gmp >= 0.2

c-sources:
cbits/getRandomBytes.c
cbits/inthash.c
cbits/siphash.c
benchmarks/cbits/fnv.c
Expand All @@ -137,8 +138,11 @@ benchmark benchmarks
Ghc-options: -fwarn-tabs
if flag(fixed-salt)
Cpp-options: -DFIXED_SALT
if os(windows)
extra-libraries: advapi32
else
c-sources: cbits/getRandomBytes.c
other-modules: Data.Hashable.RandomSource
if os(windows)
extra-libraries: advapi32

source-repository head
type: git
Expand Down

0 comments on commit 7d6fe7d

Please sign in to comment.