[compiler-rt] r351927 - Fix building sanitizers for MinGW

Martin Storsjo via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 22 23:23:16 PST 2019


Author: mstorsjo
Date: Tue Jan 22 23:23:16 2019
New Revision: 351927

URL: http://llvm.org/viewvc/llvm-project?rev=351927&view=rev
Log:
Fix building sanitizers for MinGW

The /EHsc flag is MSVC specific, not generic to the windows target.

Modified:
    compiler-rt/trunk/lib/fuzzer/CMakeLists.txt

Modified: compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/CMakeLists.txt?rev=351927&r1=351926&r2=351927&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/fuzzer/CMakeLists.txt Tue Jan 22 23:23:16 2019
@@ -71,7 +71,7 @@ if (CMAKE_CXX_FLAGS MATCHES "fsanitize-c
   list(APPEND LIBFUZZER_CFLAGS -fno-sanitize-coverage=trace-pc-guard,edge,trace-cmp,indirect-calls,8bit-counters)
 endif()
 
-if(OS_NAME MATCHES "Windows")
+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)




More information about the llvm-commits mailing list