[asan] Remove flags for clang-cl before it supported EH
authorReid Kleckner <rnk@google.com>
Wed, 31 Oct 2018 00:20:41 +0000 (00:20 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 31 Oct 2018 00:20:41 +0000 (00:20 +0000)
Also remove -Wno-undefined-inline, which needed to work around PR19898,
which was fixed.

llvm-svn: 345677

compiler-rt/cmake/Modules/AddCompilerRT.cmake
compiler-rt/cmake/base-config-ix.cmake
compiler-rt/lib/asan/tests/CMakeLists.txt

index 4d4222d..c91565f 100644 (file)
@@ -371,15 +371,6 @@ append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 COMPILER_RT_UNITTEST_CFLAGS
 append_list_if(COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG -Wno-covered-switch-default COMPILER_RT_UNITTEST_CFLAGS)
 
 if(MSVC)
-  # clang doesn't support exceptions on Windows yet.
-  list(APPEND COMPILER_RT_UNITTEST_CFLAGS -D_HAS_EXCEPTIONS=0)
-
-  # We should teach clang to understand "#pragma intrinsic", see PR19898.
-  list(APPEND COMPILER_RT_UNITTEST_CFLAGS -Wno-undefined-inline)
-
-  # Clang doesn't support SEH on Windows yet.
-  list(APPEND COMPILER_RT_GTEST_CFLAGS -DGTEST_HAS_SEH=0)
-
   # gtest use a lot of stuff marked as deprecated on Windows.
   list(APPEND COMPILER_RT_GTEST_CFLAGS -Wno-deprecated-declarations)
 endif()
index b92e29a..2a44d83 100644 (file)
@@ -122,8 +122,6 @@ macro(test_targets)
   # what version of MSVC to pretend to be so that the STL works.
   set(MSVC_VERSION_FLAG "")
   if (MSVC)
-    # Find and run MSVC (not clang-cl) and get its version. This will tell
-    # clang-cl what version of MSVC to pretend to be so that the STL works.
     execute_process(COMMAND "$ENV{VSINSTALLDIR}/VC/bin/cl.exe"
       OUTPUT_QUIET
       ERROR_VARIABLE MSVC_COMPAT_VERSION
index 1b70605..9e640d1 100644 (file)
@@ -68,11 +68,6 @@ if(APPLE)
   list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS})
 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}