Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: cargo: Set default release profile to use LTO #117

Closed
wants to merge 1 commit into from

Conversation

jpds
Copy link

@jpds jpds commented May 21, 2024

Linux distros use this target for their end-user packages, as such this needs to be the default for those users to take advantage of the performance benefits.

Linux distros use this target for their end-user packages, as such this
needs to be the default for those users to take advantage of the
performance benefits.
@jpds jpds force-pushed the cargo-default-lto-release branch from 52e5447 to 1523704 Compare May 21, 2024 18:45
@jpds jpds changed the title cargo: Set default release profile to use LTO build: cargo: Set default release profile to use LTO May 21, 2024
@plusvic
Copy link
Member

plusvic commented May 22, 2024

I'm not convinced about making LTO the default because compilation is very slow, specially when used together with codegen-units = 1. The default release profile is good enough, and produces very fast code. The real benefit I see in using the release-lto profile is reducing the executable size.

I prefer using as the default release configuration whatever cargo choses as default. Anything that deviates from cargo's default, is a special profile used for specific purposes.

@plusvic plusvic closed this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants