Bug 981920 - ASAN builds should use -fno-omit-frame-pointer by default. r=glandium
authorAndrew McCreight <continuation@gmail.com>
Tue, 18 Mar 2014 14:25:40 -0700
changeset 174191 a0ee12861380df8ce7590225b6bbc21a0aa35aba
parent 174190 8fdfcc4878db5585b5d1ecf419a7d7a1477fb796
child 174192 e827367613616d67ec7ecd24f18884054e872a02
push idunknown
push userunknown
push dateunknown
reviewersglandium
bugs981920
milestone31.0a1
Bug 981920 - ASAN builds should use -fno-omit-frame-pointer by default. r=glandium
build/autoconf/frameptr.m4
--- a/build/autoconf/frameptr.m4
+++ b/build/autoconf/frameptr.m4
@@ -23,16 +23,18 @@ AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [
     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 we are debugging, profiling or using ASAN, we want a frame pointer.
   if test -z "$MOZ_OPTIMIZE" -o \
-          -n "$MOZ_PROFILING" -o -n "$MOZ_DEBUG"; then
+          -n "$MOZ_PROFILING" -o \
+          -n "$MOZ_DEBUG" -o \
+          -n "$MOZ_ASAN"; then
     MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR"
   else
     MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR"
   fi
 ])