Browse Source

cli: add custom release profile to improve CU efficiency (#1807)

Paul 3 years ago
parent
commit
fe255bba2b
2 changed files with 7 additions and 0 deletions
  1. 1 0
      CHANGELOG.md
  2. 6 0
      cli/src/template.rs

+ 1 - 0
CHANGELOG.md

@@ -13,6 +13,7 @@ The minor version will be incremented upon a breaking change and the patch versi
 ### Features
 ### Features
 
 
 * cli: Add `--program-keypair` to `anchor deploy` ([#1786](https://github.com/project-serum/anchor/pull/1786)).
 * cli: Add `--program-keypair` to `anchor deploy` ([#1786](https://github.com/project-serum/anchor/pull/1786)).
+* cli: Add compilation optimizations to cli template ([#1807](https://github.com/project-serum/anchor/pull/1807)).
 
 
 ### Fixes
 ### Fixes
 
 

+ 6 - 0
cli/src/template.rs

@@ -19,6 +19,12 @@ members = [
 
 
 [profile.release]
 [profile.release]
 overflow-checks = true
 overflow-checks = true
+lto = "fat"
+codegen-units = 1
+[profile.release.build-override]
+opt-level = 3
+incremental = false
+codegen-units = 1
 "#
 "#
 }
 }