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
}
}
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*{

View file

@ -25,6 +25,16 @@ unix {
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*{

View file

@ -23,6 +23,16 @@ unix {
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*{

View file

@ -23,6 +23,16 @@ unix {
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*{

View file

@ -22,6 +22,16 @@ unix {
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*{

View file

@ -22,6 +22,16 @@ unix {
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*{

View file

@ -22,6 +22,16 @@ unix {
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*{

View file

@ -22,6 +22,16 @@ unix {
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*{

View file

@ -28,6 +28,16 @@ unix {
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*{

View file

@ -23,6 +23,16 @@ unix {
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*{

View file

@ -22,6 +22,16 @@ unix {
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*{

View file

@ -22,6 +22,16 @@ unix {
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*{

View file

@ -27,6 +27,16 @@ unix {
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*{

View file

@ -24,6 +24,16 @@ unix {
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*{

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
# want them in global list. Compromise decision delete them from local list.
QMAKE_CXXFLAGS -= \

View file

@ -24,6 +24,16 @@ unix {
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*{

View file

@ -20,6 +20,16 @@ unix {
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*{

View file

@ -24,6 +24,16 @@ unix {
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*{

View file

@ -24,6 +24,16 @@ unix {
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*{