daml/bazel_tools/haskell-opt.patch
Moritz Kiefer 11923381fa
Default to -c opt in Bazel (#2592)
This makes sure that C dependencies like gRPC or zlib get compiled
with optimizations. I patched rules_haskell to use -O instead of -O2
since the latter slows down compilation while not making things
faster (according to my measurements).
2019-08-19 17:10:30 +02:00

14 lines
509 B
Diff

diff --git a/haskell/private/actions/compile.bzl b/haskell/private/actions/compile.bzl
index ac8725f5..3f6e4b40 100644
--- a/haskell/private/actions/compile.bzl
+++ b/haskell/private/actions/compile.bzl
@@ -250,7 +250,7 @@ def _compilation_defaults(hs, cc, java, dep_info, plugin_dep_info, cc_info, srcs
# Compilation mode. Allow rule-supplied compiler flags to override it.
if hs.mode == "opt":
- args.add("-O2")
+ args.add("-O")
args.add("-static")
if with_profiling: