Merge #13445: build: Reset default -g -O2 flags when enable debug
9882d1f044
Reset default -g -O2 flags when enable debug (Chun Kuan Lee)
Pull request description:
The default CXXFLAGS is -g -O2, this should not appear when enable debug.
fixes #13432
Tree-SHA512: 79447f3e1fab9e6cd12f5ca49b3d42187e856e0c159ed01140ea93d6ef1fbb1af3d65b338308566330491052c0177d12abe26796513502ddde31692665a0dbb4
This commit is contained in:
commit
8eb76f3958
1 changed files with 4 additions and 0 deletions
|
@ -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],
|
||||
|
|
Loading…
Reference in a new issue