Bug 1322735 - Enable frame pointers on 32-bit windows builds. r?glandium draft
authorEric Rahm <erahm@mozilla.com>
Wed, 11 Jan 2017 17:54:18 -0800
changeset 459501 e0c33e4bcf8bafa396a78ddb7c4ecd4849a4cd06
parent 458764 dbc2084de15a8a3b71843c1c1000df54bc1b0beb
child 459502 886ea9889ceb796701777200a1b8058e1981f1f0
push id41241
push usererahm@mozilla.com
push dateThu, 12 Jan 2017 02:40:39 +0000
reviewersglandium
bugs1322735
milestone53.0a1
Bug 1322735 - Enable frame pointers on 32-bit windows builds. r?glandium This universally disables FPO on win32. MozReview-Commit-ID: AT9ozxGN0C5
build/autoconf/frameptr.m4
--- a/build/autoconf/frameptr.m4
+++ b/build/autoconf/frameptr.m4
@@ -24,19 +24,21 @@ AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [
     dnl Oy (Frame-Pointer Omission) is only support on x86 compilers
     *-mingw32*)
       MOZ_ENABLE_FRAME_PTR="-Oy-"
       MOZ_DISABLE_FRAME_PTR="-Oy"
     ;;
     esac
   fi
 
-  # if we are debugging, profiling or using sanitizers, we want a frame pointer.
+  # If we are debugging, profiling, using sanitizers, or on win32 we want a
+  # frame pointer.
   if test -z "$MOZ_OPTIMIZE" -o \
           -n "$MOZ_PROFILING" -o \
           -n "$MOZ_DEBUG" -o \
           -n "$MOZ_MSAN" -o \
-          -n "$MOZ_ASAN"; then
+          -n "$MOZ_ASAN" -o \
+          "$OS_ARCH:$CPU_ARCH" = "WINNT:x86"; then
     MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR"
   else
     MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR"
   fi
 ])