Disable exceptions with Clang on Windows in lib/sanitizer-common/tests
authorReid Kleckner <reid@kleckner.net>
Tue, 5 May 2015 16:52:50 +0000 (16:52 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 5 May 2015 16:52:50 +0000 (16:52 +0000)
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

index b062c5a..7379e52 100644 (file)
@@ -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)