Compile debug build with gcc's Address Sanitizer.

--HG--
branch : develop
This commit is contained in:
dismine 2014-12-20 20:18:00 +02:00
parent a94d7b4066
commit f62b78bd9b
7 changed files with 33 additions and 2 deletions

View File

@ -145,12 +145,13 @@ GCC_DEBUG_CXXFLAGS += \
-Wstrict-overflow=5 \
-Wundef \
-Wno-unused \
-ftrapv
-ftrapv \
-fsanitize=address #gccs 4.8.0 Address Sanitizer
# Usefull Clang warnings keys.
CLANG_DEBUG_CXXFLAGS += \
-O0 \ # Turn off oprimization.
$$ISYSTEM \ # Ignore warnings Qt headers.
$$ISYSTEM \ # Ignore warnings in Qt headers.
# Last gdb doesn't show debug symbols with Qt Creator (issue with Python 3 and debug scripts that use Python 2.7).
# Solution to use older version gdb, that's why we use old standard of debug information.
-gdwarf-3 \

View File

@ -82,6 +82,11 @@ CONFIG(debug, debug|release){
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
#gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/
QMAKE_CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address
}
clang*{
QMAKE_CXXFLAGS += \

View File

@ -58,6 +58,11 @@ CONFIG(debug, debug|release){
# Key -isystem disable checking errors in system headers.
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
#gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/
QMAKE_CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address
}
clang*{
QMAKE_CXXFLAGS += \

View File

@ -65,6 +65,11 @@ CONFIG(debug, debug|release){
# Key -isystem disable checking errors in system headers.
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
#gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/
QMAKE_CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address
}
clang*{
QMAKE_CXXFLAGS += \

View File

@ -48,6 +48,11 @@ CONFIG(debug, debug|release){
# Key -isystem disable checking errors in system headers.
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
#gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/
QMAKE_CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address
}
clang*{
QMAKE_CXXFLAGS += \

View File

@ -63,6 +63,11 @@ CONFIG(debug, debug|release){
# Key -isystem disable checking errors in system headers.
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
#gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/
QMAKE_CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address
}
clang*{
QMAKE_CXXFLAGS += \

View File

@ -53,6 +53,11 @@ CONFIG(debug, debug|release){
*-g++{
QMAKE_CXXFLAGS += \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
#gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/
QMAKE_CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address
}
clang*{
QMAKE_CXXFLAGS += \