-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Type: FixIndicates a fix to existing codeIndicates a fix to existing code
Description
During the 0.25 release we've noticed a significant variation in the binary size, where simply changing the firecracker version would add 15kb to the binary size.
Later investigation showed that LTO was at fault for this change in size - simply disabling the LTO would produce consistent binaries.
Further reading the cargo reference manual on lto shows that No LTO is performed if codegen units is 1 or opt-level is 0.. Testing without LTO indeed produces consistent binaries and as a bonus, smaller ones - the v0.25 one is 0.5 mb smaller.
Also, in the context of a previously opened PR by @KarthikNedunchezhiyan here, I propose that we add codegen-units=1 to the release profile to prevent variations such as this one.
Metadata
Metadata
Assignees
Labels
Type: FixIndicates a fix to existing codeIndicates a fix to existing code