Disable exceptions for clang-compiled unittest code on Windows
authorReid Kleckner <reid@kleckner.net>
Fri, 1 May 2015 22:23:56 +0000 (22:23 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 1 May 2015 22:23:56 +0000 (22:23 +0000)
llvm-svn: 236357

compiler-rt/lib/asan/tests/CMakeLists.txt

index 16baf45..75b2282 100644 (file)
@@ -52,6 +52,11 @@ if(APPLE)
   list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS ${DARWIN_osx_LINKFLAGS})
 endif()
 
+if(MSVC)
+  # Disable exceptions on Windows until they work reliably.
+  list(APPEND ASAN_UNITTEST_COMMON_CFLAGS -fno-exceptions -DGTEST_HAS_SEH=0)
+endif()
+
 set(ASAN_BLACKLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/asan_test.ignore")
 set(ASAN_UNITTEST_INSTRUMENTED_CFLAGS
   ${ASAN_UNITTEST_COMMON_CFLAGS}