Bug 1263595 followup: define MOZ_STACKWALKING in the JS configure. r=glandium
authorDavid Major <dmajor@mozilla.com>
Tue, 22 Nov 2016 09:52:59 -0600
changeset 323781 5766462e2be7a0bb09f47fcd62bef6c5add329c3
parent 323780 6bcb02abe8fce19553d1e56a3822af41abdc3723
child 323782 e9d1b6c753292df38efd11f5fc4c8989abc96ee1
push id84218
push userdmajor@mozilla.com
push dateTue, 22 Nov 2016 15:54:22 +0000
treeherdermozilla-inbound@5766462e2be7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1263595
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1263595 followup: define MOZ_STACKWALKING in the JS configure. r=glandium
js/src/old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1594,16 +1594,43 @@ 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_PGO_OPTIMIZE_FLAGS)
 
 dnl ========================================================
+dnl = Enable NS_StackWalk.
+dnl ========================================================
+
+# On Windows, NS_StackWalk will only work correctly if we have frame pointers
+# available. That will only be true for non-optimized builds, debug builds or
+# builds with --enable-profiling in the .mozconfig (which is turned on in
+# Nightly by default.)
+case "$OS_TARGET" in
+WINNT)
+    if test -z "$MOZ_OPTIMIZE" -o -n "$MOZ_PROFILING" -o -n "$MOZ_DEBUG"; then
+        MOZ_STACKWALKING=1
+    else
+        MOZ_STACKWALKING=
+    fi
+    ;;
+*)
+    MOZ_STACKWALKING=1
+    ;;
+esac
+
+if test -n "$MOZ_STACKWALKING"; then
+    AC_DEFINE(MOZ_STACKWALKING)
+fi
+
+AC_SUBST(MOZ_STACKWALKING)
+
+dnl ========================================================
 dnl = Disable trace logging
 dnl ========================================================
 ENABLE_TRACE_LOGGING=1
 MOZ_ARG_DISABLE_BOOL(trace-logging,
 [  --disable-trace-logging   Disable trace logging],
     ENABLE_TRACE_LOGGING= )
 
 AC_SUBST(ENABLE_TRACE_LOGGING)