diff --git a/Cargo.toml b/Cargo.toml index d95858ee..19cbb27f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,6 +74,18 @@ pcre2 = ["grep/pcre2"] [profile.release] debug = 1 +[profile.release-lto] +inherits = "release" +opt-level = 3 +debug = "none" +strip = "symbols" +debug-assertions = false +overflow-checks = false +lto = "fat" +panic = "abort" +incremental = false +codegen-units = 1 + # This is the main way to strip binaries in the deb package created by # 'cargo deb'. For other release binaries, we (currently) call 'strip' # explicitly in the release process.