Skip to content

Commit

Permalink
Merge pull request #320 from g-r-a-n-t/fix-optimize
Browse files Browse the repository at this point in the history
Fix optimize flag.
  • Loading branch information
g-r-a-n-t authored Mar 19, 2021
2 parents f5e10e1 + e6c348e commit 1e5ce10
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 1e5ce10

Please sign in to comment.