File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,14 @@ flag debug
42
42
description : Enable debug support
43
43
default : False
44
44
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
+
45
53
library
46
54
exposed-modules :
47
55
Data.HashMap.Internal
@@ -69,7 +77,15 @@ library
69
77
MagicHash,
70
78
BangPatterns
71
79
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
73
89
74
90
-- For dumping the generated code:
75
91
-- 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