Skip to content

Commit

Permalink
chore: added cargo build profile options
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirevo committed Nov 1, 2023
1 parent 7ca1a91 commit 397193e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,21 @@ members = [
"som-parser-symbols",
"som-parser-text",
]

[profile.release]
# Enable link-time optimization, eliminates more code and inlines across crate boundaries.
# Default: false
lto = "fat"
# codegen-units of 1 gives best optimization, but disables parallel building.
# Default: 16
codegen-units = 1
# The default optimization level is 3 for release mode builds.
# 0 means disable optimization and is the default for debug mode buids.
# (Setting opt-level=1 for debug builds is a good way of speeding them up a bit.)
# "s" means optimize for size, "z" reduces size even more.
opt-level = 3

[profile.release-dbg]
inherits = "release"
# Includes debug information in release builds. Necessary for profiling.
debug = true

0 comments on commit 397193e

Please sign in to comment.