Skip to content

Commit

Permalink
Set opt-level = z, codegen-units = 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ukint-vs committed Jul 21, 2023
1 parent 01fd61b commit ab9c97a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions utils/wasm-builder/src/wasm_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ impl WasmProject {
dev_profile.insert("opt-level".into(), "s".into());

let mut release_profile = Table::new();
release_profile.insert("lto".into(), true.into());
release_profile.insert("opt-level".into(), "s".into());
release_profile.insert("lto".into(), "fat".into());
release_profile.insert("opt-level".into(), "z".into());
release_profile.insert("codegen-units".into(), 1.into());

let mut production_profile = Table::new();
production_profile.insert("inherits".into(), "release".into());
Expand Down Expand Up @@ -316,7 +317,7 @@ extern "C" fn metahash() {{
let path = optimize::optimize_wasm(
original_copy_wasm_path.clone(),
opt_wasm_path.clone(),
"s",
"z",
true,
)
.map(|res| {
Expand Down

0 comments on commit ab9c97a

Please sign in to comment.