summaryrefslogtreecommitdiffstats
path: root/cmake/3rdparty
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2020-08-03 14:30:21 +0200
committerRobert Loehning <robert.loehning@qt.io>2020-08-07 01:21:07 +0200
commit7d7e62967fb7b9b689f4a688be71722f80a6bdda (patch)
tree7a98dfef474194294875a22f4faeceddcc5171a0 /cmake/3rdparty
parentef8fe743246ed946e115266c6306d0ac82ac03f4 (diff)
configure: Explicitly enable float-divide-by-zero with ubsan
Before clang 9, it was enabled by default when -fsanitize=undefined was set. Pick-to: 5.15 Change-Id: I0faf3ae1901d4badc6d265fa8081185be4360636 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'cmake/3rdparty')
-rw-r--r--cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
index 06cc0b66d8..e7bffe15c1 100644
--- a/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
+++ b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
@@ -139,7 +139,7 @@ macro (enable_sanitizer_flags sanitize_option)
set(XSAN_LINKER_FLAGS "lsan")
elseif (${sanitize_option} MATCHES "undefined")
check_compiler_version("4.9" "3.1")
- set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls")
+ set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-omit-frame-pointer -fno-optimize-sibling-calls")
else ()
message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
endif ()