aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-08-05 14:31:57 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-08-05 16:56:28 +0200
commitcb7b0a5f34e54db8e3f56eabd9f477ab02b95f98 (patch)
tree997927c9cd87b517ffde82341150b5dd882b4e0f
parentf171149e0d541ca7da7af5fe59bd6d9a77267d24 (diff)
downloadllvm-cb7b0a5f34e54db8e3f56eabd9f477ab02b95f98.zip
llvm-cb7b0a5f34e54db8e3f56eabd9f477ab02b95f98.tar.gz
llvm-cb7b0a5f34e54db8e3f56eabd9f477ab02b95f98.tar.bz2
tsan: don't include tsan_interceptors.h for Go
None of the interceptors machinery is used/enabled for Go, so don't include the header, it's not needed (must not be). The problem is that we have fields in ThreadState that are not present in the Go build, so changes in thread_interceptors.h can cause Go build breakages due to missing fields. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D107561
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_external.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_external.cpp b/compiler-rt/lib/tsan/rtl/tsan_external.cpp
index eb72e51..19ae174 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_external.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_external.cpp
@@ -10,9 +10,12 @@
//
//===----------------------------------------------------------------------===//
#include "tsan_rtl.h"
-#include "tsan_interceptors.h"
#include "sanitizer_common/sanitizer_ptrauth.h"
+#if !SANITIZER_GO
+# include "tsan_interceptors.h"
+#endif
+
namespace __tsan {
#define CALLERPC ((uptr)__builtin_return_address(0))