Quantitative analysis of -Os vs -O3
Shi, Steven
steven.shi@intel.com
Sat Aug 26 10:05:00 GMT 2017
> 4) -Os is used heavily by the arm/thumb2 folks in bare metal applications.
Also by the x86 in bare-mental firmware, e.g. http://www.uefi.org/
> For many applications using -flto does reduce code size more than just
> going from -O2 to -Os.
Yes. -flto is must to have, but the -Os is still necessary. E.g. Uefi firmware use both (-flto -Os) when GCC build. Only -flto + -Os can make Uefi frimware GCC build be competivie with MSVS in terms of code size.
Steven
Thanks
More information about the Gcc
mailing list