Skip to content

Commit 9998310

Browse files
committed
Default to Os and drop unoptimized Yul reports
1 parent 69b0ccf commit 9998310

5 files changed

Lines changed: 100 additions & 267 deletions

File tree

CLI.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,16 @@ Optimization is controlled by `--opt-level <level>` (and the `--optimize` shorth
190190

191191
Defaults:
192192

193-
- `--opt-level` defaults to `1` (for both backends).
193+
- `--opt-level` defaults to `s` (for both backends).
194194

195195
Backend behavior:
196196

197197
- Yul backend: `--opt-level 0` disables the solc optimizer, and `--opt-level 1` / `2` enables it.
198198
- Note: `--opt-level 2` currently has no additional effect over `--opt-level 1` for solc; the CLI prints a warning.
199199
- Sonatina backend: `--opt-level <level>` controls Sonatina optimizations:
200200
- `0`: none
201-
- `1`: balanced (default)
201+
- `s`: size-optimized (default)
202+
- `1`: balanced
202203
- `2`: aggressive
203204

204205
`--optimize` is shorthand for `--opt-level 1`.

crates/fe/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ fn effective_opt_level(
971971
backend_kind: codegen::BackendKind,
972972
optimize: Option<&str>,
973973
) -> Result<codegen::OptLevel, String> {
974-
let level: codegen::OptLevel = optimize.unwrap_or("2").parse()?;
974+
let level: codegen::OptLevel = optimize.unwrap_or("s").parse()?;
975975

976976
if backend_kind == codegen::BackendKind::Yul
977977
&& let Some(optimize @ ("1" | "2")) = optimize

0 commit comments

Comments
 (0)