Bug 1525630 - choose the correct frame pointer enablement options on aarch64 windows; r=dmajor
authorNathan Froyd <froydnj@mozilla.com>
Tue, 12 Feb 2019 16:45:40 -0500
changeset 458724 6f86eefc83a5
parent 458723 5564f0314b98
child 458725 91bfef9d7343
push id35546
push userrmaries@mozilla.com
push dateWed, 13 Feb 2019 04:27:59 +0000
treeherdermozilla-central@636d2c00234d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1525630
milestone67.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 1525630 - choose the correct frame pointer enablement options on aarch64 windows; r=dmajor clang-cl doesn't currently support -Oy correctly, so we need to resort to the GNU-ish based spelling.
build/autoconf/frameptr.m4
--- a/build/autoconf/frameptr.m4
+++ b/build/autoconf/frameptr.m4
@@ -7,16 +7,26 @@ dnl disabling frame pointers in this arc
 dnl options
 
 AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [
   if test "$GNU_CC"; then
     MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer -funwind-tables"
     MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer -funwind-tables"
   else
     case "$target" in
+    dnl some versions of clang-cl don't support -Oy-; accommodate them.
+    aarch64-windows*)
+      if test "$CC_TYPE" = "clang-cl"; then
+        MOZ_ENABLE_FRAME_PTR="-Xclang -mdisable-fp-elim"
+        MOZ_DISABLE_FRAME_PTR="-Xclang -mdisable-fp-elim"
+      else
+        MOZ_ENABLE_FRAME_PTR="-Oy-"
+        MOZ_DISABLE_FRAME_PTR="-Oy"
+      fi
+    ;;
     dnl Oy (Frame-Pointer Omission) is only support on x86 compilers
     *-mingw32*)
       MOZ_ENABLE_FRAME_PTR="-Oy-"
       MOZ_DISABLE_FRAME_PTR="-Oy"
     ;;
     esac
   fi