Skip to content

Commit d8dad9e

Browse files
Turn off O2 by default, add it to kontrol.toml (#907)
1 parent b5a3f17 commit d8dad9e

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/kontrol/cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,13 @@ def parse(s: str) -> list[T]:
289289
config_args.config_args,
290290
],
291291
)
292+
build.add_argument(
293+
'--no-O2',
294+
dest='o2',
295+
default=None,
296+
action='store_false',
297+
help='Do not use optimization level 2.',
298+
)
292299
build.add_argument(
293300
'--regen',
294301
dest='regen',

src/kontrol/options.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ class BuildOptions(LoggingOptions, KOptions, KGenOptions, KompileOptions, Foundr
858858
@staticmethod
859859
def default() -> dict[str, Any]:
860860
return {
861+
'o2': True,
861862
'regen': False,
862863
'rekompile': False,
863864
'forge_build': True,

src/kontrol/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def kontrol_toml_file_contents() -> str:
209209
require = 'lemmas.k'
210210
module-import = 'TestBase:KONTROL-LEMMAS'
211211
auxiliary-lemmas = true
212+
o2 = true
212213
213214
[prove.default]
214215
foundry-project-root = '.'

0 commit comments

Comments
 (0)