Cargo.toml: Enable full LTO in release builds and thin in dev builds. #704

Merged
lx merged 1 commit from jpds/garage:release-build-lto into main 2024-02-07 16:37:03 +00:00
Contributor

Optimizations picked from cloud-hypervisor project: https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/Cargo.toml#L20-L24

Binary sizes:

-rwxr-xr-x. 1 build build  17M Feb  7 16:01 ../garage-lto*
-rwxr-xr-x. 2 build build 689M Feb  7 16:09 target/release/garage*
Optimizations picked from `cloud-hypervisor` project: https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/Cargo.toml#L20-L24 Binary sizes: ``` -rwxr-xr-x. 1 build build 17M Feb 7 16:01 ../garage-lto* -rwxr-xr-x. 2 build build 689M Feb 7 16:09 target/release/garage* ```
jpds added 1 commit 2024-02-07 16:14:40 +00:00
Cargo.toml: Enable full LTO in release builds and thin in dev builds.
All checks were successful
continuous-integration/drone/pr Build is passing
620664ee9c
Owner

Thanks, LGTM. I think for the moment this will not be taken into account in the Nix build process that builds release binaries, we'll have to look into that.

Thanks, LGTM. I think for the moment this will not be taken into account in the Nix build process that builds release binaries, we'll have to look into that.
lx merged commit 59930977e0 into main 2024-02-07 16:37:03 +00:00
Owner

I think thin LTO is adding at least a few minutes to our debug builds which is pretty annoying for the CI, so I will disable it on debug for now.

I think thin LTO is adding at least a few minutes to our debug builds which is pretty annoying for the CI, so I will disable it on debug for now.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#704
No description provided.