From b2c7fce968025a2ffb393e2eb4a79cac125bd691 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 28 Mar 2020 08:30:22 +0100 Subject: [PATCH] cmake: Update compile flags for UndefinedSanitizer Signed-off-by: Andreas Schneider Reviewed-by: Jakub Jelen --- cmake/Modules/DefineCompilerFlags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake index c9aea580..39378a10 100644 --- a/cmake/Modules/DefineCompilerFlags.cmake +++ b/cmake/Modules/DefineCompilerFlags.cmake @@ -36,9 +36,9 @@ if (UNIX AND NOT WIN32) CACHE STRING "Flags used by the linker during MEMORYSANITIZER builds.") # Activate with: -DCMAKE_BUILD_TYPE=UndefinedSanitizer - set(CMAKE_C_FLAGS_UNDEFINEDSANITIZER "-g -O1 -fsanitize=undefined -fsanitize=null -fsanitize=alignment -fno-sanitize-recover" + set(CMAKE_C_FLAGS_UNDEFINEDSANITIZER "-g -O1 -fsanitize=undefined -fsanitize=null -fsanitize=alignment -fno-sanitize-recover=undefined,integer" CACHE STRING "Flags used by the C compiler during UNDEFINEDSANITIZER builds.") - set(CMAKE_CXX_FLAGS_UNDEFINEDSANITIZER "-g -O1 -fsanitize=undefined -fsanitize=null -fsanitize=alignment -fno-sanitize-recover" + set(CMAKE_CXX_FLAGS_UNDEFINEDSANITIZER "-g -O1 -fsanitize=undefined -fsanitize=null -fsanitize=alignment -fno-sanitize-recover=undefined,integer" CACHE STRING "Flags used by the CXX compiler during UNDEFINEDSANITIZER builds.") set(CMAKE_SHARED_LINKER_FLAGS_UNDEFINEDSANITIZER "-fsanitize=undefined" CACHE STRING "Flags used by the linker during the creation of shared libraries during UNDEFINEDSANITIZER builds.")