From 6792973b6c7b9b7de1cd7ce5734e70ef85c6e680 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 22 Aug 2023 09:24:27 -0400 Subject: [PATCH] Cargo.toml: Update `release` profile, add `releaselto` - `release` should use `panic=abort` by default because we make heavy use of FFI and this is safest, and I don't think we need unwinding anyways - The `releaselto` produces smallest binaries --- Cargo.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index d49afd92..d381af31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,3 +7,12 @@ opt-level = 1 # No optimizations are too slow for us. [profile.release] lto = "thin" +# We use FFI so this is safest +panic = "abort" +# We assume we're being delivered via e.g. RPM which supports split debuginfo +debug = true + +[profile.releaselto] +codegen-units = 1 +inherits = "release" +lto = "yes"