Skip to content

Commit

Permalink
chore: tweak debug config for all profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Jan 29, 2024
1 parent 5c26704 commit dc19893
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,20 @@ homepage = "https://github.com/foundry-rs/foundry"
repository = "https://github.com/foundry-rs/foundry"
exclude = ["benches/", "tests/", "test-data/", "testdata/"]

# Speed up compilation time for dev builds by reducing emitted debug info.
# NOTE: Debuggers may provide less useful information with this setting.
# Uncomment this section if you're using a debugger.
[profile.dev]
# Disabling debug info speeds up builds a bunch,
# and we don't rely on it for debugging that much
debug = 0
debug = 1

# Speed up tests and dev build
# Speed up tests and dev build.
[profile.dev.package]
# solc
# Solc and artifacts
foundry-compilers.opt-level = 3
solang-parser.opt-level = 3
serde_json.opt-level = 3

# evm
# EVM
alloy-primitives.opt-level = 3
alloy-sol-types.opt-level = 3
hashbrown.opt-level = 3
Expand All @@ -67,11 +68,11 @@ scrypt.opt-level = 3
# forking
axum.opt-level = 3

# Local "release" mode, more optimized than dev but much faster to compile than release
# Local "release" mode, more optimized than dev but much faster to compile than release.
[profile.local]
inherits = "dev"
opt-level = 1
strip = true
strip = "debuginfo"
panic = "abort"
codegen-units = 16

Expand All @@ -83,15 +84,16 @@ strip = "none"
panic = "unwind"
incremental = false

# Optimized release profile
# Optimized release profile.
[profile.release]
opt-level = 3
debug = "line-tables-only"
lto = "fat"
strip = "debuginfo"
panic = "abort"
codegen-units = 1

# Override packages which aren't perf-sensitive for faster compilation speed
# Override packages which aren't perf-sensitive for faster compilation speed.
[profile.release.package]
mdbook.opt-level = 1
protobuf.opt-level = 1
Expand Down

0 comments on commit dc19893

Please sign in to comment.