From 5c4aff2c9a4c2778ed225210e5eff17a215e916a Mon Sep 17 00:00:00 2001 From: Brock <58987761+13r0ck@users.noreply.github.com> Date: Thu, 29 Dec 2022 13:13:47 -0700 Subject: [PATCH] Use linker time optimization for release builds (#47) This reduces total package size by ~25%. There are no runtime consequences, though this does nearly double build times. But with the cargo workspace, this repo builds pretty quick. As well the same `lto` settings are already used in cosmic-comp. --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index c530e0d3..98eaaa3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,3 +14,6 @@ members = [ [patch.crates-io] zbus = {git = "https://gitlab.freedesktop.org/dbus/zbus", branch = "main"} + +[profile.release] +lto = "fat"