Compile debug build with gcc's Address Sanitizer.
--HG-- branch : develop
This commit is contained in:
parent
a94d7b4066
commit
f62b78bd9b
|
@ -145,12 +145,13 @@ GCC_DEBUG_CXXFLAGS += \
|
|||
-Wstrict-overflow=5 \
|
||||
-Wundef \
|
||||
-Wno-unused \
|
||||
-ftrapv
|
||||
-ftrapv \
|
||||
-fsanitize=address #gcc’s 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 \
|
||||
|
|
|
@ -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.
|
||||
|
||||
#gcc’s 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 += \
|
||||
|
|
|
@ -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.
|
||||
|
||||
#gcc’s 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 += \
|
||||
|
|
|
@ -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.
|
||||
|
||||
#gcc’s 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 += \
|
||||
|
|
|
@ -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.
|
||||
|
||||
#gcc’s 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 += \
|
||||
|
|
|
@ -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.
|
||||
|
||||
#gcc’s 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 += \
|
||||
|
|
|
@ -53,6 +53,11 @@ CONFIG(debug, debug|release){
|
|||
*-g++{
|
||||
QMAKE_CXXFLAGS += \
|
||||
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
|
||||
|
||||
#gcc’s 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 += \
|
||||
|
|
Loading…
Reference in New Issue
Block a user