Cargo: add hooks to reduce binary size

These can be turned on if we want to reduce the size of our binaries.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-05-10 15:09:24 +08:00
parent ff46015127
commit 7087fbe823
2 changed files with 4 additions and 0 deletions

View file

@ -76,6 +76,8 @@ exclude = [
codegen-units = 1 # 1 better optimizations
debug = true # symbols are nice and they don't increase the size on Flash
lto = "fat"
#panic = "abort" # Remove panic output, which can reduce file size
#opt-level = 'z' # Optimize for size instead of performance
[patch.crates-io]
xous = {path = "xous-rs"}

View file

@ -36,3 +36,5 @@ crossbeam-channel = "0.5"
codegen-units = 1 # 1 better optimizations
debug = true # symbols are nice and they don't increase the size on Flash
lto = "fat"
# panic = "abort" # Remove some panic information
# opt-level = 'z' # Optimize for size instead of performance