Skip to content

Commit

Permalink
chore: avoid [build-dependencies] being compiled twice
Browse files Browse the repository at this point in the history
Before: `cargo build --release`:
Building [========>               ] ../1339
After:
Building [========>               ] ../1065

Background #12315 (comment)
  • Loading branch information
xxchan committed Sep 17, 2023
1 parent 8ef74ad commit b96fda9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ lto = 'off'
debug = "full"
split-debuginfo = "packed"
lto = "thin"
# To avoid [build-dependencies] being compiled twice
[profile.release.build-override]
opt-level = 3

# The profile used for CI in main branch.
# This profile inherits from the release profile, but turns on some checks and assertions for us to
Expand Down Expand Up @@ -216,6 +219,9 @@ inherits = "dev"
opt-level = 2
incremental = false
debug = 1
# To avoid [build-dependencies] being compiled twice
[profile.ci-sim.build-override]
opt-level = 2

# Patch third-party crates for deterministic simulation.
[patch.crates-io]
Expand Down

0 comments on commit b96fda9

Please sign in to comment.