File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,14 @@ flag debug
4242 description : Enable debug support
4343 default : False
4444
45+ flag noMsse42
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+
4553library
4654 exposed-modules :
4755 Data.HashMap.Internal
@@ -69,7 +77,15 @@ library
6977 MagicHash,
7078 BangPatterns
7179
72- ghc-options : -Wall -O2 -fwarn-tabs -ferror-spans
80+ if flag(noMsse42)
81+ ghc-options : -Wall -O2 -fwarn-tabs -ferror-spans
82+ else
83+ -- only enable flag on x86
84+ if arch(i386) || arch(x86_64)
85+ ghc-options : -Wall -O2 -fwarn-tabs -ferror-spans -msse4.2
86+ else
87+ -- else, get whatever GHC gives you
88+ ghc-options : -Wall -O2 -fwarn-tabs -ferror-spans
7389
7490 -- For dumping the generated code:
7591 -- ghc-options: -ddump-simpl -ddump-stg-final -ddump-cmm -ddump-asm -ddump-to-file
You can’t perform that action at this time.
0 commit comments