Skip to content

Commit

Permalink
Reset default -g -O2 flags when enable debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ken2812221 committed Jun 12, 2018
1 parent 7c32b41 commit 9882d1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,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],
Expand Down

0 comments on commit 9882d1f

Please sign in to comment.