Re: OS X compiler flags

sayrer <[email protected]>
Newsgroups gmane.comp.mozilla.performance
Organization http://groups.google.com
Message-ID <[email protected]>
On Nov 4, 10:31 am, Boris Zbarsky <[email protected]> wrote:
> sayrer wrote:
> > While reading Apple documentation, I noticed that gcc has an -Os
> > option that performs most of the -O2 optimizations, leaves out those
> > that increase code size, and performs additional code size
> > optimizations. Also, Apple documentation said the -dead_strip linker
> > flag we use should be combined with -gfull for maximum effectiveness.
>
> > Should we try the "-Os -gfull" flags on tinderbox?
>
> So right now on Mac we seem to be doing (for the nightly builds):
>
>    ac_add_options --enable-optimize="-O2 -g"
>
> With gcc on Linux, we are doing:
>
>    ac_add_options --enable-optimize="-Os -freorder-blocks -fno-reorder-functions
> -gstabs+"
>
> based on some performance testing way back when.

OK, http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html says -
freorder-functions is only effective with profile feedback, so it
makes sense to turn that off. -freorder-blocks is usually disabled
with -Os, so maybe we want to take that optimization. -gfull is fine
for mac, I think. It shouldn't increase the size of stripped builds.

- Rob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.