-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Is your feature request related to a problem? Please describe.
I use CMake RelWithDebInfo builds - I don't use Release as I'm never going to distribute something if I don't have debug symbols for it :)
It seems that this disables some of the usual release mode linker flags, in particular:
/INCREMENTAL:NO- SizeBench does warn about this/OPT:ICF/OPT:REF
Describe the solution you'd like
It seems like SizeBench could make a reasonable guess that /OPT:ICF or /OPT:REF were not passed, and suggest I enable them.
Describe alternatives you've considered
doing it with sizebench without 'magic' :)
I eventually found all of these flags through looking through SizeBench's reports; for example, the lack of /OPT:REF was obvious from this:
I'm only using one of those WinRT classes, so the majority of them should not be in my executable. After everything else, finding this and turning on /OPT:REF cut my executable from 3MB to 1.5MB
Additional context
Thank you so much for this incredible tool. I read the 2021 blog post last night, and this morning I easily cut my executable from 12.5MB to 1.5MB.