Bug 697572 - Port Bug 680277 "Debug builds should always be compiled with frame pointers" to c-c. r=Standard8
This commit is contained in:
Родитель
5637f0e3c0
Коммит
f24c0ac54c
|
@ -13,6 +13,7 @@ builtin(include, mozilla/build/autoconf/altoptions.m4)dnl
|
|||
builtin(include, mozilla/build/autoconf/mozprog.m4)dnl
|
||||
builtin(include, mozilla/build/autoconf/acwinpaths.m4)dnl
|
||||
builtin(include, mozilla/build/autoconf/lto.m4)dnl
|
||||
builtin(include, mozilla/build/autoconf/frameptr.m4)dnl
|
||||
|
||||
MOZ_PROG_CHECKMSYS()
|
||||
|
||||
|
|
|
@ -235,6 +235,7 @@ ACDEFINES = @MOZ_DEFINES@
|
|||
WARNINGS_AS_ERRORS = @WARNINGS_AS_ERRORS@
|
||||
|
||||
MOZ_OPTIMIZE = @MOZ_OPTIMIZE@
|
||||
MOZ_FRAMEPTR_FLAGS = @MOZ_FRAMEPTR_FLAGS@
|
||||
MOZ_OPTIMIZE_FLAGS = @MOZ_OPTIMIZE_FLAGS@
|
||||
MOZ_OPTIMIZE_LDFLAGS = @MOZ_OPTIMIZE_LDFLAGS@
|
||||
MOZ_OPTIMIZE_SIZE_TWEAK = @MOZ_OPTIMIZE_SIZE_TWEAK@
|
||||
|
|
|
@ -426,6 +426,8 @@ endif # MOZ_OPTIMIZE == 1
|
|||
endif # MOZ_OPTIMIZE
|
||||
endif # CROSS_COMPILE
|
||||
|
||||
CFLAGS += $(MOZ_FRAMEPTR_FLAGS)
|
||||
CXXFLAGS += $(MOZ_FRAMEPTR_FLAGS)
|
||||
|
||||
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
|
||||
#// Currently, unless USE_STATIC_LIBS is defined, the multithreaded
|
||||
|
|
24
configure.in
24
configure.in
|
@ -1907,12 +1907,7 @@ ld.])
|
|||
*-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.
|
||||
if test -z "$MOZ_PROFILING"; then
|
||||
MOZ_OPTIMIZE_FLAGS="-O3 -fomit-frame-pointer"
|
||||
else
|
||||
MOZ_OPTIMIZE_FLAGS="-O3 -fno-omit-frame-pointer"
|
||||
fi
|
||||
MOZ_OPTIMIZE_FLAGS="-O3"
|
||||
_PEDANTIC=
|
||||
CFLAGS="$CFLAGS -fpascal-strings -fno-common"
|
||||
CXXFLAGS="$CXXFLAGS -fpascal-strings -fno-common"
|
||||
|
@ -2073,12 +2068,7 @@ ia64*-hpux*)
|
|||
# -Os is broken on gcc 4.1.x 4.2.x, 4.5.0 we need to tweak it to get good results.
|
||||
MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50"
|
||||
esac
|
||||
# If we're building with --enable-profiling, we need a frame pointer.
|
||||
if test -z "$MOZ_PROFILING"; then
|
||||
MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fomit-frame-pointer $MOZ_OPTIMIZE_SIZE_TWEAK"
|
||||
else
|
||||
MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-omit-frame-pointer $MOZ_OPTIMIZE_SIZE_TWEAK"
|
||||
fi
|
||||
MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK"
|
||||
MOZ_DEBUG_FLAGS="-g"
|
||||
fi
|
||||
|
||||
|
@ -2262,12 +2252,7 @@ ia64*-hpux*)
|
|||
MOZ_DEBUG_FLAGS='-Zi'
|
||||
MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
|
||||
WARNINGS_AS_ERRORS='-WX'
|
||||
# If we're building with --enable-profiling, we need -Oy-, which forces a frame pointer.
|
||||
if test -z "$MOZ_PROFILING"; then
|
||||
MOZ_OPTIMIZE_FLAGS='-O1'
|
||||
else
|
||||
MOZ_OPTIMIZE_FLAGS='-O1 -Oy-'
|
||||
fi
|
||||
MOZ_OPTIMIZE_FLAGS='-O1'
|
||||
MOZ_JS_STATIC_LIBS='$(LIBXUL_DIST)/lib/js_static.lib'
|
||||
MOZ_JS_SHARED_LIBS='$(LIBXUL_DIST)/lib/mozjs.lib'
|
||||
MOZ_FIX_LINK_PATHS=
|
||||
|
@ -5741,6 +5726,8 @@ else
|
|||
MOZ_OPTIMIZE=
|
||||
fi ], MOZ_OPTIMIZE=1)
|
||||
|
||||
MOZ_SET_FRAMEPTR_FLAGS
|
||||
|
||||
if test "$COMPILE_ENVIRONMENT"; then
|
||||
if test -n "$MOZ_OPTIMIZE"; then
|
||||
AC_MSG_CHECKING([for valid optimization flags])
|
||||
|
@ -5759,6 +5746,7 @@ fi
|
|||
fi # COMPILE_ENVIRONMENT
|
||||
|
||||
AC_SUBST(MOZ_OPTIMIZE)
|
||||
AC_SUBST(MOZ_FRAMEPTR_FLAGS)
|
||||
AC_SUBST(MOZ_OPTIMIZE_FLAGS)
|
||||
AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
|
||||
AC_SUBST(MOZ_OPTIMIZE_SIZE_TWEAK)
|
||||
|
|
Загрузка…
Ссылка в новой задаче