diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2016-01-27 12:05:11 +0100 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2016-01-27 12:05:28 +0100 |
commit | ac791649bc13085b2f75fc97db3e32d0b4301a0c (patch) | |
tree | cb53bee85c9288c97f68b98345abdbf525ee898e /lambdacube-compiler.cabal | |
parent | 2092ca9e3d9482d939d61ebaf10d71578169e0ec (diff) |
minimize profiling build
Diffstat (limited to 'lambdacube-compiler.cabal')
-rw-r--r-- | lambdacube-compiler.cabal | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/lambdacube-compiler.cabal b/lambdacube-compiler.cabal index 0c3763e4..af2fa967 100644 --- a/lambdacube-compiler.cabal +++ b/lambdacube-compiler.cabal | |||
@@ -20,6 +20,10 @@ Data-Files: | |||
20 | lc/Internals.lc | 20 | lc/Internals.lc |
21 | lc/Prelude.lc | 21 | lc/Prelude.lc |
22 | 22 | ||
23 | Flag onlytestsuite | ||
24 | Description: Only compiles the library and testsuit | ||
25 | Default: False | ||
26 | |||
23 | Flag profiling | 27 | Flag profiling |
24 | Description: Enable profiling | 28 | Description: Enable profiling |
25 | Default: False | 29 | Default: False |
@@ -80,6 +84,11 @@ library | |||
80 | hs-source-dirs: src | 84 | hs-source-dirs: src |
81 | default-language: Haskell2010 | 85 | default-language: Haskell2010 |
82 | 86 | ||
87 | if flag(profiling) | ||
88 | GHC-Options: -O2 -fprof-auto -rtsopts | ||
89 | else | ||
90 | GHC-Options: -O2 | ||
91 | |||
83 | 92 | ||
84 | executable lambdacube-compiler-unit-tests | 93 | executable lambdacube-compiler-unit-tests |
85 | hs-source-dirs: test | 94 | hs-source-dirs: test |
@@ -96,6 +105,10 @@ executable lambdacube-compiler-unit-tests | |||
96 | tasty >= 0.11 && <0.12, | 105 | tasty >= 0.11 && <0.12, |
97 | tasty-quickcheck >=0.8 && <0.9 | 106 | tasty-quickcheck >=0.8 && <0.9 |
98 | 107 | ||
108 | if flag(onlytestsuite) | ||
109 | Buildable: False | ||
110 | else | ||
111 | Buildable: True | ||
99 | 112 | ||
100 | executable lambdacube-compiler-test-suite | 113 | executable lambdacube-compiler-test-suite |
101 | hs-source-dirs: test | 114 | hs-source-dirs: test |
@@ -124,6 +137,11 @@ executable lambdacube-compiler-test-suite | |||
124 | lambdacube-ir == 0.1.*, | 137 | lambdacube-ir == 0.1.*, |
125 | vector >= 0.11 && <0.12 | 138 | vector >= 0.11 && <0.12 |
126 | 139 | ||
140 | if flag(profiling) | ||
141 | GHC-Options: -O2 -fprof-auto -rtsopts | ||
142 | else | ||
143 | GHC-Options: -O2 | ||
144 | |||
127 | 145 | ||
128 | executable lc | 146 | executable lc |
129 | hs-source-dirs: tool | 147 | hs-source-dirs: tool |
@@ -139,6 +157,11 @@ executable lc | |||
139 | bytestring == 0.10.*, | 157 | bytestring == 0.10.*, |
140 | filepath == 1.4.* | 158 | filepath == 1.4.* |
141 | 159 | ||
160 | if flag(onlytestsuite) | ||
161 | Buildable: False | ||
162 | else | ||
163 | Buildable: True | ||
164 | |||
142 | 165 | ||
143 | executable lambdacube-compiler-coverage-test-suite | 166 | executable lambdacube-compiler-coverage-test-suite |
144 | hs-source-dirs: src, test | 167 | hs-source-dirs: src, test |
@@ -176,4 +199,3 @@ executable lambdacube-compiler-coverage-test-suite | |||
176 | time >= 1.5 && <1.6, | 199 | time >= 1.5 && <1.6, |
177 | vector >= 0.11 && <0.12 | 200 | vector >= 0.11 && <0.12 |
178 | 201 | ||
179 | |||