Skip to content

Commit 9882d1f

Browse files
committed
Reset default -g -O2 flags when enable debug
1 parent 7c32b41 commit 9882d1f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

configure.ac

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ AC_LANG_PUSH([C++])
243243
AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""])
244244

245245
if test "x$enable_debug" = xyes; then
246+
# Clear default -g -O2 flags
247+
if test "x$CXXFLAGS_overridden" = xno; then
248+
CXXFLAGS=""
249+
fi
246250
# Prefer -Og, fall back to -O0 if that is unavailable.
247251
AX_CHECK_COMPILE_FLAG(
248252
[-Og],

0 commit comments

Comments
 (0)