Skip to content

Commit f165b8c

Browse files
authored
Change default optimizations pass to focus on code size (#305)
* Change default opitmization pass to focus on code size * Change default optimization level from `-Os` to `-Oz` * Update CHANGELOG
1 parent 373c503 commit f165b8c

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Changed
10+
- Change default optimizations pass to focus on code size - [#305](https://github.com/paritytech/cargo-contract/pull/305)
11+
912
## [0.12.1] - 2021-04-25
1013

1114
### Added

src/cmd/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub struct BuildCommand {
8181
///
8282
/// - `z`, execute default optimization passes, super-focusing on code size
8383
///
84-
/// - The default value is `3`
84+
/// - The default value is `z`
8585
///
8686
/// - It is possible to define the number of optimization passes in the
8787
/// `[package.metadata.contract]` of your `Cargo.toml` as e.g. `optimization-passes = "3"`.

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl Display for OptimizationPasses {
128128

129129
impl Default for OptimizationPasses {
130130
fn default() -> OptimizationPasses {
131-
OptimizationPasses::Three
131+
OptimizationPasses::Z
132132
}
133133
}
134134

0 commit comments

Comments
 (0)