Skip to content

Commit 317c55a

Browse files
gromakovskygithub-actionsana-pantilie
authored
Get rid of the release flag (#3160)
* Get rid of the `release` flag Problem: `kore.cabal` contains `release` flag which is off by default. When it's disabled, code is compiled without `specialise` optimization. The flag is a bit weird: it's not clear why one may want to disable only this specific optimization. It indeed makes compilation faster and runtime slower, but if you want that, you may simply disable all optimizations. Solution: 1. We have tested whether enabling more optimizations (`-O2`) can improve performance compared to the default configuration. Our results indicate that the difference is negligible. 2. Since default configuration produces optimal performance, we don't need an extra flag to determine whether we want to compile code faster or to have faster runtime. Both `stack` and `cabal` have an easy way to enable/disable optimizations. 3. For the reasons above, we are removing this flag from `kore.cabal`. Now default build process should produce optimal executable (with all `-O1` optimizations enabled which should be sufficient). 4. We are also updating the README file to mention how one can build code faster (and get slower runtime). Resolves #3135 * Materialize Nix expressions Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: ana-pantilie <45069775+ana-pantilie@users.noreply.github.com>
1 parent fd06257 commit 317c55a

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ cabal build kore
4343
```
4444

4545
If using `cabal`, version 3.0 or later is recommended.
46+
You may pass `--fast` to `stack build` or `-O0` to `cabal build` in order to
47+
disable compiler optimizations and make build faster at the cost of slower runtime.
4648

4749
Using [make]:
4850

kore/kore.cabal

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ source-repository head
1919
type: git
2020
location: https://github.com/runtimeverification/haskell-backend
2121

22-
flag release
23-
description: Build a faster runtime, at the expense of a slower build.
24-
manual: True
25-
default: False
26-
2722
flag threaded
2823
description: Use the threaded runtime. Recommended to disable for profiling.
2924
manual: True
@@ -587,8 +582,6 @@ library
587582
hs-source-dirs:
588583
src
589584
app/share
590-
if !flag(release)
591-
ghc-options: -fno-specialise
592585

593586
executable kore-exec
594587
import: haskell

nix/kore-ghc8107.nix.d/kore.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
, config
99
, ... }:
1010
{
11-
flags = { release = false; threaded = true; };
11+
flags = { threaded = true; };
1212
package = {
1313
specVersion = "2.2";
1414
identifier = { name = "kore"; version = "0.60.0.0"; };

0 commit comments

Comments
 (0)