Skip to content

Commit

Permalink
Fix optimize flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
g-r-a-n-t committed Mar 19, 2021
1 parent 7b9ef12 commit e6c348e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions newsfragments/320.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The CLI was using the overwrite flag to enable Yul optimization.

i.e.

```
# Would both overwite output files and run the Yul optimizer.
$ fe my_contract.fe --overwrite
```


Using the overwrite flag now only overwrites and optimization is enabled with the optimize flag.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub fn main() {
let input_file = matches.value_of("input").unwrap();
let output_dir = matches.value_of("output-dir").unwrap();
let overwrite = matches.is_present("overwrite");
let optimize = matches.is_present("overwrite");
let optimize = matches.is_present("optimize");
let targets =
values_t!(matches.values_of("emit"), CompilationTarget).unwrap_or_else(|e| e.exit());

Expand Down

0 comments on commit e6c348e

Please sign in to comment.