From 60bdf6e4c0bfbf18a038dc098f7dce989c59a4b1 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 5 May 2015 16:52:50 +0000 Subject: [PATCH] Disable exceptions with Clang on Windows in lib/sanitizer-common/tests While I'm here, fix a copy-paste bug so we get debug info for these tests. llvm-svn: 236505 --- compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt index b062c5a..7379e52 100644 --- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt +++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt @@ -51,11 +51,16 @@ set(SANITIZER_TEST_CFLAGS_COMMON -Werror=sign-compare -Wno-non-virtual-dtor) +if(MSVC) + # Disable exceptions on Windows until they work reliably. + list(APPEND SANITIZER_TEST_CFLAGS_COMMON -fno-exceptions -DGTEST_HAS_SEH=0) +endif() + # -gline-tables-only must be enough for these tests, so use it if possible. if(COMPILER_RT_TEST_COMPILER_ID MATCHES "Clang") - list(APPEND ASAN_UNITTEST_COMMON_CFLAGS -gline-tables-only) + list(APPEND SANITIZER_TEST_CFLAGS_COMMON -gline-tables-only) else() - list(APPEND ASAN_UNITTEST_COMMON_CFLAGS -g) + list(APPEND SANITIZER_TEST_CFLAGS_COMMON -g) endif() if(NOT MSVC) -- 2.7.4