forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default to
-c opt
in Bazel (digital-asset#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).
- Loading branch information
1 parent
47238a5
commit 1192338
Showing
4 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters