on master help sign in
Add include-strict-utf8 build flag
6db157fHarendra Kumar
benchmark/Streamly/Benchmark/Unicode/Stream.hs+1−1
@@ -276,7 +276,7 @@ o_1_space_decode_encode_read env =
276 copyStreamLatin1' inh outh
276 copyStreamLatin1' inh outh
277 , mkBench "encodeLatin1 . decodeLatin1" env $ \inh outh ->
277 , mkBench "encodeLatin1 . decodeLatin1" env $ \inh outh ->
278 copyStreamLatin1 inh outh
278 copyStreamLatin1 inh outh
279−#ifdef DEVBUILD
279+#ifdef INCLUDE_STRICT_UTF8
280 -- Requires valid unicode input
280 -- Requires valid unicode input
281 , mkBench "encodeUtf8' . decodeUtf8'" env $ \inh outh ->
281 , mkBench "encodeUtf8' . decodeUtf8'" env $ \inh outh ->
282 _copyStreamUtf8' inh outh
282 _copyStreamUtf8' inh outh
benchmark/streamly-benchmarks.cabal+8
@@ -39,6 +39,11 @@ flag dev
39 manual: True
39 manual: True
40 default: False
40 default: False
41
41
42+flag include-strict-utf8
43+ description: Include strict utf8 input benchmarks
44+ manual: True
45+ default: False
46+
42flag has-llvm
47flag has-llvm
43 description: Use llvm backend for better performance
48 description: Use llvm backend for better performance
44 manual: True
49 manual: True
@@ -64,6 +69,9 @@ common compile-options
64 if flag(dev)
69 if flag(dev)
65 cpp-options: -DDEVBUILD
70 cpp-options: -DDEVBUILD
66
71
72+ if flag(include-strict-utf8)
73+ cpp-options: -DINCLUDE_STRICT_UTF8
74+
67 if flag(inspection)
75 if flag(inspection)
68 cpp-options: -DINSPECTION
76 cpp-options: -DINSPECTION
69
77