Make possible disable Address Sanitizer.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-05-11 10:10:25 +03:00
parent c73b2f51e1
commit c1980cc7aa
10 changed files with 118 additions and 74 deletions

View File

@ -168,8 +168,7 @@ GCC_DEBUG_CXXFLAGS += \
-Wstrict-overflow=5 \ -Wstrict-overflow=5 \
-Wundef \ -Wundef \
-Wno-unused \ -Wno-unused \
-ftrapv \ -ftrapv
-fsanitize=address #gccs 4.8.0 Address Sanitizer
# Usefull Clang warnings keys. # Usefull Clang warnings keys.
CLANG_DEBUG_CXXFLAGS += \ CLANG_DEBUG_CXXFLAGS += \

View File

@ -88,10 +88,15 @@ CONFIG(debug, debug|release){
-isystem "$${OUT_PWD}/$${RCC_DIR}" \ -isystem "$${OUT_PWD}/$${RCC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
noAddressSanitizer{
# do nothing
} else {
#gccs 4.8.0 Address Sanitizer #gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ #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_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS += -fsanitize=address
}
} }
clang*{ clang*{
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \

View File

@ -64,10 +64,15 @@ CONFIG(debug, debug|release){
-isystem "$${OUT_PWD}/$${MOC_DIR}" \ -isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
noAddressSanitizer{
# do nothing
} else {
#gccs 4.8.0 Address Sanitizer #gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ #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_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS += -fsanitize=address
}
} }
clang*{ clang*{
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \

View File

@ -75,10 +75,15 @@ CONFIG(debug, debug|release){
-isystem "$${OUT_PWD}/$${MOC_DIR}" \ -isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
noAddressSanitizer{
# do nothing
} else {
#gccs 4.8.0 Address Sanitizer #gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ #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_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS += -fsanitize=address
}
} }
clang*{ clang*{
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \

View File

@ -54,10 +54,15 @@ CONFIG(debug, debug|release){
-isystem "$${OUT_PWD}/$${MOC_DIR}" \ -isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
noAddressSanitizer{
# do nothing
} else {
#gccs 4.8.0 Address Sanitizer #gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ #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_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS += -fsanitize=address
}
} }
clang*{ clang*{
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \

View File

@ -56,10 +56,15 @@ CONFIG(debug, debug|release){
-isystem "$${OUT_PWD}/$${MOC_DIR}" \ -isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
noAddressSanitizer{
# do nothing
} else {
#gccs 4.8.0 Address Sanitizer #gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ #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_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS += -fsanitize=address
}
} }
clang*{ clang*{
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \

View File

@ -54,10 +54,15 @@ CONFIG(debug, debug|release){
-isystem "$${OUT_PWD}/$${MOC_DIR}" \ -isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
noAddressSanitizer{
# do nothing
} else {
#gccs 4.8.0 Address Sanitizer #gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ #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_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS += -fsanitize=address
}
} }
clang*{ clang*{
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \

View File

@ -78,10 +78,15 @@ CONFIG(debug, debug|release){
QMAKE_CXXFLAGS -= \ QMAKE_CXXFLAGS -= \
-Wswitch-default -Wswitch-default
noAddressSanitizer{
# do nothing
} else {
#gccs 4.8.0 Address Sanitizer #gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ #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_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS += -fsanitize=address
}
} }
clang*{ clang*{

View File

@ -54,10 +54,15 @@ CONFIG(debug, debug|release){
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
noAddressSanitizer{
# do nothing
} else {
#gccs 4.8.0 Address Sanitizer #gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ #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_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS += -fsanitize=address
}
} }
clang*{ clang*{
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \

View File

@ -58,10 +58,15 @@ CONFIG(debug, debug|release){
-isystem "$${OUT_PWD}/$${RCC_DIR}" \ -isystem "$${OUT_PWD}/$${RCC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
noAddressSanitizer{
# do nothing
} else {
#gccs 4.8.0 Address Sanitizer #gccs 4.8.0 Address Sanitizer
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ #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_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS+=-fsanitize=address QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
QMAKE_LFLAGS += -fsanitize=address
}
} }
clang*{ clang*{
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \