GCC does not support `-fsanitize=nullability`
This commit is contained in:
parent
89df134fed
commit
122e142726
|
@ -19,11 +19,17 @@ endif()
|
|||
|
||||
if(ANALYZE_UNDEFINED)
|
||||
# TODO: enable signed-integer-overflow
|
||||
add_compile_options(-fsanitize=undefined -fsanitize=nullability -fno-sanitize=signed-integer-overflow)
|
||||
add_compile_options(-fsanitize=undefined -fno-sanitize=signed-integer-overflow)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options(-fsanitize=nullability)
|
||||
endif()
|
||||
add_compile_options(-fno-sanitize-recover=all)
|
||||
add_compile_options(-fno-omit-frame-pointer)
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined -fsanitize=nullability -fno-sanitize=signed-integer-overflow")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined -fno-sanitize=signed-integer-overflow")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=nullability")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANALYZE_DATAFLOW)
|
||||
|
|
|
@ -28,3 +28,4 @@ Other:
|
|||
- You can suppress warnings in a block of code using "-begin" and "-end".
|
||||
- You can suppress warnings in current file using "-file".
|
||||
- You can suppress all warnings where macro is used using "-macro"
|
||||
- fixed CMake build with UBSAN and GCC
|
||||
|
|
Loading…
Reference in New Issue