summaryrefslogtreecommitdiff
path: root/contrib/compiler-rt/lib/xray/xray_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/compiler-rt/lib/xray/xray_defs.h')
-rw-r--r--contrib/compiler-rt/lib/xray/xray_defs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/compiler-rt/lib/xray/xray_defs.h b/contrib/compiler-rt/lib/xray/xray_defs.h
index e5c37c0665db..c009bcc879f1 100644
--- a/contrib/compiler-rt/lib/xray/xray_defs.h
+++ b/contrib/compiler-rt/lib/xray/xray_defs.h
@@ -19,4 +19,14 @@
#define XRAY_NEVER_INSTRUMENT
#endif
+#if SANITIZER_NETBSD
+// NetBSD: thread_local is not aligned properly, and the code relying
+// on it segfaults
+#define XRAY_TLS_ALIGNAS(x)
+#define XRAY_HAS_TLS_ALIGNAS 0
+#else
+#define XRAY_TLS_ALIGNAS(x) alignas(x)
+#define XRAY_HAS_TLS_ALIGNAS 1
+#endif
+
#endif // XRAY_XRAY_DEFS_H