Summary:
Disable exceptions in MSVC headers using -D_HAS_EXCEPTIONS=0
to silence compiler warning instead of using /Ehsc.
Reviewers: rnk, morehouse, metzman
Reviewed By: rnk, morehouse, metzman
Subscribers: rnk, morehouse, mgorny
Differential Revision: https://reviews.llvm.org/D57119
llvm-svn: 352144
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)