mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-04-30 21:49:46 -05:00
added Clang UBSan support
- allow to enable UBSan with the CONFIG+=ubsan config with qmake - added UBSan.supp config to suppress Qt's errors, can be enabled using the UBSAN_OPTIONS=suppressions=<path>/UBSan.supp env. variable
This commit is contained in:
@@ -41,3 +41,24 @@ QMAKE_CXXFLAGS_WARN_ON *= \
|
||||
|
||||
# Clang 12 still doesn't support -Wstrict-null-sentinel
|
||||
!clang: QMAKE_CXXFLAGS_WARN_ON *= -Wstrict-null-sentinel
|
||||
|
||||
# Allow to enable UBSan with Clang
|
||||
clang:ubsan: {
|
||||
QMAKE_CXXFLAGS += -O1
|
||||
|
||||
QMAKE_CXXFLAGS *= \
|
||||
-fsanitize=undefined \
|
||||
-fsanitize=nullability \
|
||||
-fsanitize=float-divide-by-zero \
|
||||
-fsanitize=unsigned-integer-overflow \
|
||||
-fsanitize=implicit-conversion \
|
||||
-fsanitize=local-bounds \
|
||||
|
||||
QMAKE_LFLAGS *= \
|
||||
-fsanitize=undefined \
|
||||
-fsanitize=nullability \
|
||||
-fsanitize=float-divide-by-zero \
|
||||
-fsanitize=unsigned-integer-overflow \
|
||||
-fsanitize=implicit-conversion \
|
||||
-fsanitize=local-bounds
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
implicit-integer-sign-change:qarraydata.h
|
||||
unsigned-integer-overflow:qhashfunctions.h
|
||||
Reference in New Issue
Block a user