summaryrefslogtreecommitdiffstats
path: root/base/dynamic_annotations.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/dynamic_annotations.h')
-rw-r--r--base/dynamic_annotations.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/dynamic_annotations.h b/base/dynamic_annotations.h
index 23a2a27..a6ed91e 100644
--- a/base/dynamic_annotations.h
+++ b/base/dynamic_annotations.h
@@ -26,7 +26,12 @@
#ifndef BASE_DYNAMIC_ANNOTATIONS_H_
#define BASE_DYNAMIC_ANNOTATIONS_H_
+#ifdef __GNUC__
+// valgrind.h uses gcc extensions so it may not build with other compilers.
+// Also, it defines NVALGRIND on Windows, which disables dynamic annotations
+// for ThreadSanitizer.
#include "base/third_party/valgrind/valgrind.h"
+#endif
#ifndef NVALGRIND
// -------------------------------------------------------------