diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-06-13 15:46:46 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-06-13 15:49:10 +0200 |
commit | 8eb76f3958e3e2af7a2fb7a14017d478c44ac484 (patch) | |
tree | fde9ca233c399b25469f8017bc25596cbfd0f329 /configure.ac | |
parent | cf7ca609234dac203257178e45f1e1570b98134f (diff) | |
parent | 9882d1f044133832b3c0809676d5f26a861b9f44 (diff) |
Merge #13445: build: Reset default -g -O2 flags when enable debug
9882d1f044133832b3c0809676d5f26a861b9f44 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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 218ad4883b..926d0b8d00 100644 --- a/configure.ac +++ b/configure.ac @@ -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], |