Bug 680515 - Don't use MODULE_OPTIMIZE_FLAGS in js/src.

Using MODULE_OPTIMIZE_FLAGS overrides MOZ_OPTIMIZE_FLAGS and prevents
js/src/configure from sharing more logic with the toplevel configure.
This commit is contained in:
Rafael Ávila de Espíndola 2011-08-20 18:28:52 -04:00
parent e932421b76
commit a8617e6339
2 changed files with 6 additions and 33 deletions

View File

@ -77,36 +77,6 @@ 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

View File

@ -1992,11 +1992,14 @@ case "$target" in
*-darwin*)
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
# If we're building with --enable-profiling, we need a frame pointer.
MOZ_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.
if test -z "$MOZ_PROFILING"; then
MOZ_OPTIMIZE_FLAGS="-O3 -fomit-frame-pointer"
MOZ_OPTIMIZE_FLAGS="$MOZ_OPTIMIZE_FLAGS -fomit-frame-pointer"
else
MOZ_OPTIMIZE_FLAGS="-O3 -fno-omit-frame-pointer"
MOZ_OPTIMIZE_FLAGS="$MOZ_OPTIMIZE_FLAGS -fno-omit-frame-pointer"
fi
_PEDANTIC=
CFLAGS="$CFLAGS -fpascal-strings -fno-common"