diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2014-03-19 13:24:52 +0000 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2014-03-19 13:24:52 +0000 |
| commit | cc579aeba624eaf1da336662de78554447b193ee (patch) | |
| tree | be0b294457cdc090195ad94a875ddf08e29f3aa3 | |
| parent | ecc3456fd631f90477b046b404e346f893ec308c (diff) | |
| download | bcm5719-llvm-cc579aeba624eaf1da336662de78554447b193ee.tar.gz bcm5719-llvm-cc579aeba624eaf1da336662de78554447b193ee.zip | |
tsan: use attribute instead of compiler flag for tls-model=initial-exec as asked in comments for r203111
llvm-svn: 204232
| -rw-r--r-- | compiler-rt/lib/tsan/dd/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/dd/dd_interceptors.cc | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/dd/CMakeLists.txt b/compiler-rt/lib/tsan/dd/CMakeLists.txt index da43f6621dc..305e26c078a 100644 --- a/compiler-rt/lib/tsan/dd/CMakeLists.txt +++ b/compiler-rt/lib/tsan/dd/CMakeLists.txt @@ -4,7 +4,6 @@ include_directories(../..) set(DD_CFLAGS ${SANITIZER_COMMON_CFLAGS}) append_no_rtti_flag(DD_CFLAGS) -list(APPEND DD_CFLAGS -ftls-model=initial-exec) if("${CMAKE_BUILD_TYPE}" EQUAL "Release") set(DD_COMMON_DEFINITIONS DEBUG=0) diff --git a/compiler-rt/lib/tsan/dd/dd_interceptors.cc b/compiler-rt/lib/tsan/dd/dd_interceptors.cc index 4d3b15f0a59..8151f7fd3c6 100644 --- a/compiler-rt/lib/tsan/dd/dd_interceptors.cc +++ b/compiler-rt/lib/tsan/dd/dd_interceptors.cc @@ -18,7 +18,9 @@ using namespace __dsan; extern "C" void *__libc_malloc(uptr size); extern "C" void __libc_free(void *ptr); +__attribute__((tls_model("initial-exec"))) static __thread Thread *thr; +__attribute__((tls_model("initial-exec"))) static __thread volatile int initing; static bool inited; static uptr g_data_start; |

