release builds: set lto="thin" and strip="debuginfo" (#1342)

- thin LTO is much much faster to compile, this will help when making
  release builds
- strip="debuginfo" allows to still have symbols when unwinding stack
  traces, which are usefull to have in user's bug reports. Binary size
  is increased from 23M to 27M, so a reasonable increase

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1342
Co-authored-by: Alex Auvolat <lx@deuxfleurs.fr>
Co-committed-by: Alex Auvolat <lx@deuxfleurs.fr>
This commit is contained in:
Alex Auvolat
2026-02-15 08:58:57 +00:00
committed by Alex
parent c373222e3a
commit 7ad0f96222
+3 -7
View File
@@ -174,12 +174,8 @@ aws-sdk-s3 = { version = "1.121", default-features = false, features = [
"rt-tokio",
] }
[profile.dev]
#lto = "thin" # disabled for now, adds 2-4 min to each CI build
lto = "off"
[profile.release]
lto = true
codegen-units = 1
lto = "thin"
codegen-units = 16
opt-level = 3
strip = true
strip = "debuginfo"