[PATCH] D57119: [libFuzzer][MSVC] Disable exceptions in MSVC headers

Jonathan Metzman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 24 17:10:57 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT352144: [libFuzzer][MSVC] Disable exceptions in MSVC headers (authored by metzman, committed by ).
Herald added subscribers: Sanitizers, llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D57119?vs=183177&id=183447#toc

Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57119/new/

https://reviews.llvm.org/D57119

Files:
  lib/fuzzer/CMakeLists.txt


Index: lib/fuzzer/CMakeLists.txt
===================================================================
--- lib/fuzzer/CMakeLists.txt
+++ lib/fuzzer/CMakeLists.txt
@@ -72,9 +72,10 @@
 endif()
 
 if(MSVC)
-  # Silence warnings with /Ehsc and avoid an error by unecessarily defining
-  # thread_local when it isn't even used on Windows.
-  list(APPEND LIBFUZZER_CFLAGS /EHsc)
+  # Silence warnings by turning off exceptions in MSVC headers and avoid an
+  # error by unecessarily defining thread_local when it isn't even used on
+  # Windows.
+  list(APPEND LIBFUZZER_CFLAGS -D_HAS_EXCEPTIONS=0)
 else()
   if(NOT HAS_THREAD_LOCAL)
     list(APPEND LIBFUZZER_CFLAGS -Dthread_local=__thread)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57119.183447.patch
Type: text/x-patch
Size: 686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190125/15da3565/attachment.bin>


More information about the llvm-commits mailing list