diff options
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h')
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h index 4b780917fd7..7ffebcb5ff7 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h @@ -35,6 +35,14 @@ # define SANITIZER_WEAK_ATTRIBUTE __attribute__((weak)) #endif +// Mac handles TLS differently +#if SANITIZER_MAC +# define SANITIZER_TLS_INITIAL_EXEC_ATTRIBUTE +#else +# define SANITIZER_TLS_INITIAL_EXEC_ATTRIBUTE \ + __attribute((tls_model("initial-exec"))) thread_local +#endif + //--------------------------- WEAK FUNCTIONS ---------------------------------// // When working with weak functions, to simplify the code and make it more // portable, when possible define a default implementation using this macro: |