Added gcc’s 4.9.0 Undefined Behavior Sanitizer (ubsan).

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-06-01 10:14:17 +03:00
parent ac584a6855
commit cc5641a15c
19 changed files with 190 additions and 0 deletions

View File

@ -24,6 +24,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -25,6 +25,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -23,6 +23,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -23,6 +23,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -22,6 +22,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -22,6 +22,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -22,6 +22,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -22,6 +22,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -28,6 +28,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -23,6 +23,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -22,6 +22,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -22,6 +22,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -27,6 +27,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -24,6 +24,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -23,6 +23,16 @@ unix {
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
# -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and
# want them in global list. Compromise decision delete them from local list. # want them in global list. Compromise decision delete them from local list.
QMAKE_CXXFLAGS -= \ QMAKE_CXXFLAGS -= \

View File

@ -24,6 +24,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -20,6 +20,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -24,6 +24,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{

View File

@ -24,6 +24,16 @@ unix {
QMAKE_LFLAGS += -fsanitize=address QMAKE_LFLAGS += -fsanitize=address
} }
} }
gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan
CONFIG(debug, debug|release){
# Debug mode
#gccs 4.9.0 Undefined Behavior Sanitizer (ubsan)
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_CFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
}
}
} }
clang*{ clang*{