From 7087fbe8231bb1c14a386c95c1570db518e636bd Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Mon, 10 May 2021 15:09:24 +0800 Subject: [PATCH] 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 --- Cargo.toml | 2 ++ kernel/Cargo.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index a3171f722..3fac29549 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"} diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index d05b7bbc0..32d347566 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -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