From e61f4d51559d584df6f34a4f70387639269bdce8 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Mon, 12 May 2014 10:40:33 +0000 Subject: [PATCH] [tsan] force tls_model='initial-exec' for tsan's cur_thread_placeholder so that we don't depend on the compiler flags llvm-svn: 208536 --- compiler-rt/lib/tsan/rtl/tsan_rtl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.h b/compiler-rt/lib/tsan/rtl/tsan_rtl.h index 418e2e3989f2..41db8aacdc5b 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl.h +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.h @@ -473,6 +473,7 @@ struct ThreadState { }; #ifndef TSAN_GO +__attribute__((tls_model("initial-exec"))) extern THREADLOCAL char cur_thread_placeholder[]; INLINE ThreadState *cur_thread() { return reinterpret_cast(&cur_thread_placeholder);