From da919766855bacca0c74c33d457f215df9a9738d Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 12 Feb 2019 16:45:40 -0500 Subject: [PATCH] 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/autoconf/frameptr.m4 b/build/autoconf/frameptr.m4 index 4a6c532acf56..17d51579f3a8 100644 --- a/build/autoconf/frameptr.m4 +++ b/build/autoconf/frameptr.m4 @@ -12,6 +12,16 @@ AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [ 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-"