Back out ecef6506d094 (bug 680515) for busting opt OS X
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 19 Aug 2011 18:42:11 -0700
changeset 75591 8f1ad97f4bc2f48a73fc2573bf5f1dee1d168cf0
parent 75590 6d0afd5ef9b253148578384c25a52c897caa2c3f
child 75592 96e052b3e845f99e91bac5783ba94fc029870b80
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
bugs680515
milestone9.0a1
backs outecef6506d094b2cbdb504d68becfbb6d6ecb86ce
Back out ecef6506d094 (bug 680515) for busting opt OS X
js/src/Makefile.in
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -72,16 +72,46 @@ endif
 
 MODULE		    = js
 LIBRARY_NAME	    = mozjs
 STATIC_LIBRARY_NAME = js_static
 GRE_MODULE	    = 1
 
 LIBS		= $(NSPR_LIBS) 
 
+ifdef GNU_CXX
+ifdef INTEL_CXX
+# icc gets special optimize flags
+ifdef MOZ_PROFILE_GENERATE
+MODULE_OPTIMIZE_FLAGS = -O0
+else
+MODULE_OPTIMIZE_FLAGS = -O2 -ip
+endif
+else # not INTEL_CXX
+
+MODULE_OPTIMIZE_FLAGS = -O3 -fstrict-aliasing -fno-stack-protector
+
+# We normally want -fomit-frame-pointer, but we want an explicit
+# -fno-omit-frame-pointer if we're using a sampling profiler.
+ifndef MOZ_PROFILING
+MODULE_OPTIMIZE_FLAGS += -fomit-frame-pointer
+else
+MODULE_OPTIMIZE_FLAGS += -fno-omit-frame-pointer
+endif
+
+endif
+else # not GNU_CXX
+ifeq ($(OS_ARCH),SunOS)
+MODULE_OPTIMIZE_FLAGS = -xO4
+endif
+ifeq ($(OS_ARCH),WINNT)
+MODULE_OPTIMIZE_FLAGS = -O2
+endif
+endif
+
 ifeq ($(OS_ARCH),WINNT)
 NO_PROFILE_GUIDED_OPTIMIZE = 1
 endif
 
 # JavaScript must be built shared, even for static builds, as it is used by
 # other modules which are always built shared. Failure to do so results in
 # the js code getting copied into xpinstall and jsd as well as mozilla-bin,
 # and then the static data cells used for locking no longer work.