From 4943217045beb468897d1af0014472a9fe22d11b Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Thu, 16 Jan 2025 15:30:41 +0200 Subject: [PATCH 1/2] cargo: Disable LTO.. ..to reduce `liblimbo_sqlite3.a` size from 37M to 20M. As it turns out, LLVM emits its bitcode into static libraries when LTO is enabled to be "more aggressive" in optimizations Refs #714 --- Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 22787b9f9..3aec744e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,7 @@ github-attestations = true [profile.release] codegen-units = 1 panic = "abort" -lto = true +lto = "off" [profile.bench-profile] inherits = "release" @@ -62,4 +62,3 @@ debug = true [profile.dist] inherits = "release" -lto = "thin" From 21c5fe29098e19038b1dfecdaa4e72aafa8fa6a4 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Thu, 16 Jan 2025 19:59:10 +0200 Subject: [PATCH 2/2] cargo: Switch to "line-tables-only" debug symbols ...reduces size of `liblimbo_sqlite3.a` to 15 MB. Suggested by @psvri --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 3aec744e1..5d28dc6dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,6 +52,7 @@ dist = false github-attestations = true [profile.release] +debug = "line-tables-only" codegen-units = 1 panic = "abort" lto = "off"