Skip to content

Tweak build options for faster tool build #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 11 additions & 39 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,55 +45,27 @@ tinybmp = "0.5.0"
smart-leds = "0.3.0"
ws2812-pio = "0.6.0"

# cargo build/run
[profile.dev]
[profile.dev.package.ledmatrix]
codegen-units = 1
debug = 2
debug-assertions = true
incremental = false
incremental = true
# To allow single-stepping through code use 0. Will cause timing issues, though
opt-level = 3
overflow-checks = true

# cargo build/run --release
[profile.release]
[profile.dev.package.c1minimal]
codegen-units = 1
debug = 2
debug-assertions = false
incremental = false
lto = 'fat'
incremental = true
# To allow single-stepping through code use 0. Will cause timing issues, though
opt-level = 3
overflow-checks = false

# do not optimize proc-macro crates = faster builds from scratch
[profile.dev.build-override]
codegen-units = 8
debug = false
debug-assertions = false
opt-level = 0
overflow-checks = false

[profile.release.build-override]
codegen-units = 8
debug = false
debug-assertions = false
opt-level = 0
overflow-checks = false

# cargo test
[profile.test]
[profile.dev.package.b1display]
codegen-units = 1
debug = 2
debug-assertions = true
incremental = false
incremental = true
# To allow single-stepping through code use 0. Will cause timing issues, though
opt-level = 3
overflow-checks = true

# cargo test --release
[profile.bench]
# Faster and smaller code but much slower to compile.
# Increase in rebuild time from <1s to 20s
[profile.release]
codegen-units = 1
debug = 2
debug-assertions = false
incremental = false
lto = 'fat'
opt-level = 3