Skip to content

Commit 13070e4

Browse files
author
doyougnu
committed
cabal: add noSse42 flag
- Closes haskell-unordered-containers#464
1 parent 259dc9e commit 13070e4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

unordered-containers.cabal

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ flag debug
4242
description: Enable debug support
4343
default: False
4444

45+
flag noSse42
46+
description: Instruct GHC to *not* use -msse4.2. Typical use case is to allow
47+
older architectures to use unordered-containers. Only relevant
48+
for x86; expect performance regressions on newer architectures
49+
when enabled.
50+
default: False
51+
52+
4553
library
4654
exposed-modules:
4755
Data.HashMap.Internal
@@ -70,6 +78,9 @@ library
7078
BangPatterns
7179

7280
ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans
81+
if !flag(noSse42) && arch(x86_64)
82+
-- only enable flag on x86
83+
ghc-options: -msse4.2
7384

7485
-- For dumping the generated code:
7586
-- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file

0 commit comments

Comments
 (0)