Skip to content

Commit

Permalink
Change default optimizations pass to focus on code size (use-ink#305)
Browse files Browse the repository at this point in the history
* Change default opitmization pass to focus on code size

* Change default optimization level from `-Os` to `-Oz`

* Update CHANGELOG
  • Loading branch information
HCastano authored Jul 22, 2021
1 parent 373c503 commit f165b8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Change default optimizations pass to focus on code size - [#305](https://github.com/paritytech/cargo-contract/pull/305)

## [0.12.1] - 2021-04-25

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub struct BuildCommand {
///
/// - `z`, execute default optimization passes, super-focusing on code size
///
/// - The default value is `3`
/// - The default value is `z`
///
/// - It is possible to define the number of optimization passes in the
/// `[package.metadata.contract]` of your `Cargo.toml` as e.g. `optimization-passes = "3"`.
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl Display for OptimizationPasses {

impl Default for OptimizationPasses {
fn default() -> OptimizationPasses {
OptimizationPasses::Three
OptimizationPasses::Z
}
}

Expand Down

0 comments on commit f165b8c

Please sign in to comment.