Recommend -Zshare-generics=false with opt-level=z#81
Open
Noratrieb wants to merge 1 commit intojohnthagen:mainfrom
Open
Recommend -Zshare-generics=false with opt-level=z#81Noratrieb wants to merge 1 commit intojohnthagen:mainfrom
Noratrieb wants to merge 1 commit intojohnthagen:mainfrom
Conversation
Noratrieb
commented
Jun 7, 2025
| #[global_allocator] | ||
| static A: System = System; | ||
| ``` No newline at end of file | ||
| ``` |
Author
There was a problem hiding this comment.
Looks like there was no trailing newline and my editor added it automatically, which seems fine to me
This comment was marked as resolved.
This comment was marked as resolved.
opt-level=z|s implicitly enables -Zshare-generics=true, which sometimes has a positive and sometimes has a negative impact. Update README.md
Author
|
Although with fat LTO enabled this shouldn't make that much of a difference in practice. But I haven't tested that. |
Shatur
approved these changes
Dec 10, 2025
Shatur
left a comment
There was a problem hiding this comment.
Helped me to reduce the size even with fat lto.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
opt-level=z or opt-level=s implicitly enables -Zshare-generics=true, which sometimes has a positive and sometimes has a negative impact.
See rust-lang/rust#142164