[compiler-rt] r355397 - [sanitizers] Don't use Windows Trace Logging with Clang in MSVC mode either

Martin Storsjo via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 04:50:06 PST 2019


Author: mstorsjo
Date: Tue Mar  5 04:50:06 2019
New Revision: 355397

URL: http://llvm.org/viewvc/llvm-project?rev=355397&view=rev
Log:
[sanitizers] Don't use Windows Trace Logging with Clang in MSVC mode either

The TraceLoggingProvider.h header does work with clang-cl in general
these days with Win SDK 10.0.17763.0, but when compiled in 32 bit x86
mode, with the -Z7 flag, compilation fails with the following error:

fatal error: error in backend: assembler label '' can not be undefined

With older Win SDKs, there are other build failures (regardless of
architecture or the -Z7 flag).

Differential Revision: https://reviews.llvm.org/D58958

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h?rev=355397&r1=355396&r2=355397&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h Tue Mar  5 04:50:06 2019
@@ -804,7 +804,7 @@ enum AndroidApiLevel {
 
 void WriteToSyslog(const char *buffer);
 
-#if defined(SANITIZER_WINDOWS) && defined(_MSC_VER)
+#if defined(SANITIZER_WINDOWS) && defined(_MSC_VER) && !defined(__clang__)
 #define SANITIZER_WIN_TRACE 1
 #else
 #define SANITIZER_WIN_TRACE 0




More information about the llvm-commits mailing list