OS X compiler flags

sayrer <[email protected]>
Newsgroups gmane.comp.mozilla.performance
Organization http://groups.google.com
Message-ID <[email protected]>
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?

Results with a static build:

   bytes file
----------------------------

-O

10557580 firefox-bin
   14992 libxpcom.dylib
  613384 libmozjs.dylib
  507700 libxpcom_core.dylib

----------------------------

-O2 -g

11163428 firefox-bin
   14992 libxpcom.dylib
  658468 libmozjs.dylib
  548688 libxpcom_core.dylib

----------------------------

-Os -gfull

 9666924 firefox-bin
   14992 libxpcom.dylib
  605220 libmozjs.dylib
  484720 libxpcom_core.dylib



.mozconfig file:
----------------------------
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-opt-static
ac_add_options --enable-optimize="-Os -gfull"
ac_add_options --disable-debug
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --disable-libxul
ac_add_options --disable-tests
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.