/build/autoconf/frameptr.m4

http://github.com/zpao/v8monkey · m4 · 25 lines · 22 code · 2 blank · 1 comment · 0 complexity · b04cb7d9344ec8cb7f278ef76403d8ce MD5 · raw file

  1. dnl Set MOZ_FRAMEPTR_FLAGS to the flags that should be used for enabling or
  2. dnl disabling frame pointers in this architecture based on the configure
  3. dnl options
  4. AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [
  5. if test "$GNU_CC"; then
  6. MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer"
  7. MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer"
  8. else
  9. case "$target" in
  10. *-mingw*)
  11. MOZ_ENABLE_FRAME_PTR="-Oy-"
  12. MOZ_DISABLE_FRAME_PTR="-Oy"
  13. ;;
  14. esac
  15. fi
  16. # if we are debugging or profiling, we want a frame pointer.
  17. if test -z "$MOZ_OPTIMIZE" -o \
  18. -n "$MOZ_PROFILING" -o -n "$MOZ_DEBUG"; then
  19. MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR"
  20. else
  21. MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR"
  22. fi
  23. ])