Commit 3764e56e authored by carlosgc@webkit.org's avatar carlosgc@webkit.org

[GTK] Add a configure option to build with -g1

https://bugs.webkit.org/show_bug.cgi?id=100670

Reviewed by Martin Robinson.

Add min and full options to the --enable-debug-symbols configure
option. Using --enable-debug-symbols=min will use -g1 instead of
-g (which is actually -g2). The first level is enough for most of
the cases, like getting a backtrace, and it's the only way to
build WebKit with debug symbols in a 32 bit system. The option
full is actually the same than yes for backwards compatibility.

* configure.ac:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 626a076a
2012-10-30 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add a configure option to build with -g1
https://bugs.webkit.org/show_bug.cgi?id=100670
Reviewed by Martin Robinson.
Add min and full options to the --enable-debug-symbols configure
option. Using --enable-debug-symbols=min will use -g1 instead of
-g (which is actually -g2). The first level is enough for most of
the cases, like getting a backtrace, and it's the only way to
build WebKit with debug symbols in a 32 bit system. The option
full is actually the same than yes for backwards compatibility.
* configure.ac:
2012-10-26 Rob Buis <rbuis@rim.com>
[BlackBerry] Platform Abstraction for WebKit Resource/Image Loading
......
......@@ -827,9 +827,15 @@ AC_MSG_RESULT([$enable_fast_malloc])
# check whether to enable debug symbols
AC_MSG_CHECKING([whether to enable debug symbols])
AC_ARG_ENABLE(debug_symbols,
AC_HELP_STRING([--enable-debug-symbols],
AC_HELP_STRING([--enable-debug-symbols=yes|no|min|full],
[enable debug symbols default=no, default=yes for debug builds]),
[],[if test "$enable_debug" = "yes"; then enable_debug_symbols="yes"; else enable_debug_symbols="no"; fi])
case "$enable_debug_symbols" in
yes) enable_debug_symbols="full" ;;
no|min|full) ;;
*) AC_MSG_ERROR([Invalid debug symbols option: must be yes, no, min or full.]) ;;
esac
AC_MSG_RESULT([$enable_debug_symbols])
# check whether to enable debug features
......@@ -930,7 +936,10 @@ if test "$host_cpu" = "sh4"; then
fi
# Add '-g' flag to gcc to build with debug symbols
if test "$enable_debug_symbols" = "yes"; then
if test "$enable_debug_symbols" = "min"; then
CXXFLAGS="$CXXFLAGS -g1"
CFLAGS="$CFLAGS -g1"
elif test "$enable_debug_symbols" != "no"; then
CXXFLAGS="$CXXFLAGS -g"
CFLAGS="$CFLAGS -g"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment