gecko/build/autoconf/frameptr.m4
Ehsan Akhgari 3a282685d8 Bug 732162 - Build mobile profiling builds with -funwind-tables; r=khuey
--HG--
extra : transplant_source : 4O%F7%BA%94%0Fh%F6%5E%EA%10%E1%08%9E%D9S%A2XEd
2012-03-01 16:24:04 -05:00

31 lines
818 B
Plaintext

dnl Set MOZ_FRAMEPTR_FLAGS to the flags that should be used for enabling or
dnl disabling frame pointers in this architecture based on the configure
dnl options
AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [
case "$target" in
*android*)
unwind_tables="-funwind-tables"
;;
esac
if test "$GNU_CC"; then
MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer $unwind_tables"
MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer"
else
case "$target" in
*-mingw*)
MOZ_ENABLE_FRAME_PTR="-Oy-"
MOZ_DISABLE_FRAME_PTR="-Oy"
;;
esac
fi
# if we are debugging or profiling, we want a frame pointer.
if test -z "$MOZ_OPTIMIZE" -o \
-n "$MOZ_PROFILING" -o -n "$MOZ_DEBUG"; then
MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR"
else
MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR"
fi
])