From f8247f13e41b31f53d65bd1f90c644d6ee9808c2 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sat, 13 Apr 2024 02:20:24 -0700 Subject: [PATCH] build: use LTO for release builds and strip guestinit (#68) * initrd: strip guestinit binary before adding it to initramfs Signed-off-by: Ariadne Conill * build: use LTO for release profile artifacts this allows us to save ~25-30% on binary sizes, at least in guestinit Signed-off-by: Ariadne Conill * revert strip command usage, breaks arm Signed-off-by: Ariadne Conill * build: use strip=symbols Signed-off-by: Ariadne Conill --------- Signed-off-by: Ariadne Conill --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 15b23dc..c75d3af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -116,3 +116,7 @@ features = ["tls"] [workspace.dependencies.uuid] version = "1.6.1" features = ["v4"] + +[profile.release] +lto = "fat" +strip = "symbols"