Reset default -g -O2 flags when enable debug

This commit is contained in:
Chun Kuan Lee 2018-06-12 07:50:14 +00:00 committed by Jack Grigg
parent 45e203181a
commit 88c9e22eb2
No known key found for this signature in database
GPG Key ID: 9E8255172BBF9898
1 changed files with 4 additions and 0 deletions

View File

@ -188,6 +188,10 @@ AC_LANG_PUSH([C++])
AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""])
if test "x$enable_debug" = xyes; then
# Clear default -g -O2 flags
if test "x$CXXFLAGS_overridden" = xno; then
CXXFLAGS=""
fi
# Prefer -Og, fall back to -O0 if that is unavailable.
AX_CHECK_COMPILE_FLAG(
[-Og],