Skip to content

Commit

Permalink
Enable incremental for release mode via [profile.<...>] overrides.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb authored and XAMPPRocky committed Mar 29, 2021
1 parent db208e7 commit 30c9b1f
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ members = [
"tests/deps-helper",
]

# Compile build-dependencies in release mode with
# the same settings as regular dependencies.
[profile.release.build-override]
opt-level = 3
codegen-units = 16

# Enable incremental by default in release mode.
[profile.release]
incremental = true
# HACK(eddyb) this is the default but without explicitly specifying it, Cargo
# will treat the identical settings in `[profile.release.build-override]` above
# will treat the identical settings in `[profile.release.build-override]` below
# as different sets of `rustc` flags and will not reuse artifacts between them.
[profile.release]
codegen-units = 16
codegen-units = 256

# Compile build-dependencies in release mode with the same settings
# as regular dependencies (including the incremental enabled above).
[profile.release.build-override]
opt-level = 3
incremental = true
codegen-units = 256

[patch.crates-io]
spirv-std = { path = "./crates/spirv-std" }
Expand Down

0 comments on commit 30c9b1f

Please sign in to comment.