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

Enable removal of unused functions to reduce size #4

Merged
merged 1 commit into from
May 7, 2024

Conversation

shartte
Copy link
Contributor

@shartte shartte commented May 7, 2024

This should reduce (for example) the size of the x86_64 DLL from 700kb to 140kb, the same should apply to the other architectures.

Documentation for /OPT:REF:
https://learn.microsoft.com/en-us/cpp/build/reference/opt-optimizations?view=msvc-170

For new Visual Studio 2022 projects, this option is also enabled by default (among others) in release mode (/OPT:ICF and /LTCG are also enabled but I saw no size benefits)

@modmuss50 modmuss50 merged commit 096eb3e into FabricMC:main May 7, 2024
1 check passed
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