summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/xray/xray_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/xray/xray_defs.h')
-rw-r--r--compiler-rt/lib/xray/xray_defs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler-rt/lib/xray/xray_defs.h b/compiler-rt/lib/xray/xray_defs.h
index e5c37c0665d..c009bcc879f 100644
--- a/compiler-rt/lib/xray/xray_defs.h
+++ b/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
OpenPOWER on IntegriCloud