Skip to content

Commit

Permalink
refactor: keep bench and release profile in sync to avoid surprises (#…
Browse files Browse the repository at this point in the history
…4679)

Cargo's smaller profiles, like `test` and `bench`, work in a rather
curious fashion. When you run `cargo test`, `cargo test --release` or
`cargo bench`, the tset/bench profiles apply only to a subset of code
being compiled. Most things are compiled with dev/release profile
instead.

To avoid surprises where things compile differently, it's advisable to
keep bench in sync with release.

cc #4507
  • Loading branch information
matklad authored Aug 13, 2021
1 parent fd1b848 commit 3216f6e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ wasmer-compiler-singlepass = { git = "https://github.com/near/wasmer", branch =
overflow-checks = true

[profile.bench]
lto = true
codegen-units = 1 # Use only 1 codegen-unit to enable full optimizations.
overflow-checks = true

[profile.dev.package.hex]
Expand Down

0 comments on commit 3216f6e

Please sign in to comment.